]> git.karo-electronics.de Git - linux-beck.git/blobdiff - include/linux/device.h
Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
[linux-beck.git] / include / linux / device.h
index 6d6f1fec092fe5df78671f5b352931a2edae4aca..88192d098aed6656db545770cd3ca597ea261e1f 100644 (file)
@@ -70,8 +70,11 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
  * @dev_groups:        Default attributes of the devices on the bus.
  * @drv_groups: Default attributes of the device drivers on the bus.
  * @match:     Called, perhaps multiple times, whenever a new device or driver
- *             is added for this bus. It should return a nonzero value if the
- *             given device can be handled by the given driver.
+ *             is added for this bus. It should return a positive value if the
+ *             given device can be handled by the given driver and zero
+ *             otherwise. It may also return error code if determining that
+ *             the driver supports the device is not possible. In case of
+ *             -EPROBE_DEFER it will queue the device for deferred probing.
  * @uevent:    Called when a device is added, removed, or a few other things
  *             that generate uevents to add the environment variables.
  * @probe:     Called when a new device or driver add to this bus, and callback
@@ -958,6 +961,11 @@ static inline void device_lock(struct device *dev)
        mutex_lock(&dev->mutex);
 }
 
+static inline int device_lock_interruptible(struct device *dev)
+{
+       return mutex_lock_interruptible(&dev->mutex);
+}
+
 static inline int device_trylock(struct device *dev)
 {
        return mutex_trylock(&dev->mutex);