struct bus_type ide_bus_type = {
.name = "ide",
.match = ide_bus_match,
.uevent = ide_uevent,
.probe = generic_ide_probe,
.remove = generic_ide_remove,
.shutdown = generic_ide_shutdown,
.dev_attrs = ide_dev_attrs,
.suspend = generic_ide_suspend,
.resume = generic_ide_resume,
};
如果新加入一个设备或者驱动的时候就要进行枚举,这是很明了的了,一旦匹配成功则要调用总线或者驱动的
Probe函数,这里是generic_ide_probe:
static int generic_ide_probe(struct device *dev)
{
本文转自 dog250 51CTO博客,原文链接:http://blog.51cto.com/dog250/1273946