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

    xiaoxiao2021-03-25  95

    /**  * 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); }

         
    转载请注明原文地址: https://ju.6miu.com/read-15725.html

    最新回复(0)