diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 17:11:07 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-03 17:11:07 +0200 |
commit | c5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e (patch) | |
tree | a4d44768f1591f40374c87eea9a28df8faccc103 /drivers/base/platform.c | |
parent | a31f01777bc54a0a9d57628956d05f8d454d3418 (diff) | |
parent | 36f3313d6bff91ab2a9e47698c27d15363640a4e (diff) | |
download | linux-c5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e.tar.gz linux-c5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e.tar.bz2 linux-c5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e.zip |
Merge generic_lookup_helpers into usb-next
The lookup helpers are needed here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 600913aea73b..ad78c810666a 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -1197,6 +1197,20 @@ struct bus_type platform_bus_type = { }; EXPORT_SYMBOL_GPL(platform_bus_type); +/** + * platform_find_device_by_driver - Find a platform device with a given + * driver. + * @start: The device to start the search from. + * @drv: The device driver to look for. + */ +struct device *platform_find_device_by_driver(struct device *start, + const struct device_driver *drv) +{ + return bus_find_device(&platform_bus_type, start, drv, + (void *)platform_match); +} +EXPORT_SYMBOL_GPL(platform_find_device_by_driver); + int __init platform_bus_init(void) { int error; |