Linux Kernel设备驱动模型之设备绑定驱动

来源:互联网 发布:淘宝联盟无法注册 编辑:程序博客网 时间:2024/05/03 15:33
/** * device_attach - try to attach device to a driver. * @dev: device. * * Walk the list of drivers that the bus has and call * driver_probe_device() for each pair. If a compatible * pair is found, break out and return. * * Returns 1 if the device was bound to a driver; * 0 if no matching driver was found; * -ENODEV if the device is not registered. * * When called for a USB interface, @dev->parent lock must be held. */int device_attach(struct device *dev){ return __device_attach(dev, false);}EXPORT_SYMBOL_GPL(device_attach);

void device_initial_probe(struct device *dev){ __device_attach(dev, true);}

 
 
 
0 0
原创粉丝点击