device_attach(9)

device_attach9

Try to attach device to a driver.

Usage

int device_attach(struct device * dev);

Arguments

dev

device.

Overview

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.

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.