Messages in this thread | | | From | Heiko Stuebner <> | Subject | Re: [RFC PATCH 20/57] platform: Add a helper to find device by driver | Date | Tue, 04 Jun 2019 15:29:04 +0200 |
| |
Hi,
Am Montag, 3. Juni 2019, 17:49:46 CEST schrieb Suzuki K Poulose: > There are a couple of places where we reuse platform specific > match to find a device. Instead of spilling the global varilable > everywhere, let us provide a helper to do the same. > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > Cc: Inki Dae <inki.dae@samsung.com> > Cc: Seung-Woo Kim <sw0312.kim@samsung.com> > Cc: Sandy Huang <hjc@rock-chips.com> > Cc: "Heiko Stübner" <heiko@sntech.de> > Cc: Eric Anholt <eric@anholt.net> > Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h > index cc46485..a82b3ec 100644 > --- a/include/linux/platform_device.h > +++ b/include/linux/platform_device.h > @@ -52,6 +52,9 @@ extern struct device platform_bus; > extern void arch_setup_pdev_archdata(struct platform_device *); > extern struct resource *platform_get_resource(struct platform_device *, > unsigned int, unsigned int); > +extern struct device * > +platform_find_device_by_driver(struct device dev*, > + const struct device_driver *drv);
the "dev*" causes compilation errors and also doesn't match the function definition. With "dev*" -> "*start" it compiles again and my rockchip drm driver still manages to find its components, so after the above issue is fixed:
Tested-by: Heiko Stuebner <heiko@sntech.de>
| |