lkml.org 
[lkml]   [2019]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 20/57] platform: Add a helper to find device by driver
Date
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>


\
 
 \ /
  Last update: 2019-06-04 15:30    [W:0.139 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site