@@ -463,6 +463,18 @@ driver_find_device_by_fwnode(struct device_driver *drv,
return driver_find_device(drv, NULL, fwnode, device_match_fwnode);
}
+/**
+ * driver_find_device_by_devt- device iterator for locating a particular device
+ * by devt.
+ * @driver: the driver we're iterating
+ * @devt: devt pointer to match.
+ */
+static inline struct device *driver_find_device_by_devt(struct device_driver *drv,
+ dev_t devt)
+{
+ return driver_find_device(drv, NULL, &devt, device_match_devt);
+}
+
void driver_deferred_probe_add(struct device *dev);
int driver_deferred_probe_check_state(struct device *dev);
Add a wrapper to driver_find_device() to search for a device by the device type, reusing the generic match function. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- include/linux/device.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.7.4