最終更新:2016-03-29 (火) 15:01:25 (2922d)
driver_attach
Top / driver_attach
try to bind driver to devices.
メモ
Walk the list of devices that the bus has on it and try to match the driver with each one. If driver_probe_device() returns 0 and the @dev->driver is set, we've found a compatible pair.
実装
呼び出し
- device_driver drv;
- bus_for_each_dev(drv->bus, NULL, drv, __driver_attach);
- next_device?で列挙して__driver_attach()でチェック
呼び出し元
- bus_add_driver (drivers/base/bus.c?)
- store_new_id (drivers/hid/hid-core.c)
- usb_store_new_id? (drivers/usb/core/driver.c)
- pci_add_dynid? (drivers/pci/pci-driver.c?)
- driver_attach_async?