probe 被谁调用了?

今天用gsensor的代码跟踪了下。。。真tmd复杂,只是跟了一下,细节还是不很清楚!如果我真的很清楚了,我就tmd太牛逼了!我都会把我佩服的五体投地!linux 真的很难! 真的勇士是要知难而进的!哈哈,一下内容只供我自己参考!

 

init_mma7660(void) ret = i2c_add_driver(&i2c_mma7660_driver); return i2c_register_driver(THIS_MODULE, driver); res = driver_register(&driver->driver); ret = bus_add_driver(drv); error = driver_attach(drv); return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach); error = fn(dev, data); == static int __driver_attach(struct device *dev, void *data) driver_probe_device(drv, dev); ret = really_probe(dev, drv); ret = drv->probe(dev); 

你可能感兴趣的:(c,linux,struct,Module,null,each)