摘要: driver.c:#include #include #include #include #include #include #define DRIVER_NAME "my_dev"static int my_probe(struct device *dev){ printk("driver found device !!\n"); return 0;}static int my_remove(struct device *dev){ printk("driver found device unpluged !!\n"); retur 阅读全文
posted @ 2014-01-21 17:19 山岚2013 阅读(253) 评论(0) 推荐(0) 编辑
摘要: int platform_driver_register(struct platform_driver *drv){ drv->driver.bus = &platform_bus_type;/*关联总线*/ /*关联driver的设备方法*/ if (drv->probe) drv->driver.probe = platform_drv_probe; if (drv->remove) drv->driver.remove = platform_drv_remove; if (drv->shutdown) drv->dr... 阅读全文
posted @ 2014-01-21 17:03 山岚2013 阅读(354) 评论(0) 推荐(0) 编辑