Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

device_attach(9) [centos man page]

DEVICE_ATTACH(9)					   Device drivers infrastructure					  DEVICE_ATTACH(9)

NAME
device_attach - try to attach device to a driver. SYNOPSIS
int device_attach(struct device * dev); ARGUMENTS
dev device. DESCRIPTION
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. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 DEVICE_ATTACH(9)

Check Out this Related Man Page

DEVICE_ATTACH(9)					   BSD Kernel Developer's Manual					  DEVICE_ATTACH(9)

NAME
DEVICE_ATTACH -- attach a device SYNOPSIS
#include <sys/param.h> #include <sys/bus.h> int DEVICE_ATTACH(device_t dev); DESCRIPTION
Attach a device to the system after the DEVICE_PROBE() method has been called and has indicated that the device exists. The DEVICE_ATTACH() method should initialize the hardware and allocate other system resources (such as devfs(5) entries). Devices which implement busses should use this method to probe for the existence of devices attached to the bus and add them as children. If this is combined with the use of bus_generic_attach(9) the child devices will be automatically probed and attached. RETURN VALUES
Zero is returned on success, otherwise an appropriate error is returned. SEE ALSO
devfs(5), device(9), DEVICE_DETACH(9), DEVICE_IDENTIFY(9), DEVICE_PROBE(9), DEVICE_SHUTDOWN(9) AUTHORS
This manual page was written by Doug Rabson <dfr@FreeBSD.org>. BSD
January 6, 2005 BSD
Man Page