[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7428554d-bcdf-4193-98dc-fb618d14844d@linaro.org>
Date: Mon, 9 Oct 2023 08:08:38 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Rob Herring <robh@...nel.org>, Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firmware: meson: Use device_get_match_data()
On 07/10/2023 00:46, Rob Herring wrote:
> Use preferred device_get_match_data() instead of of_match_device() to
> get the driver match data. With this, adjust the includes to explicitly
> include the correct headers.
>
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
> drivers/firmware/meson/meson_sm.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
> index 53bf56e18743..ed60f1103053 100644
> --- a/drivers/firmware/meson/meson_sm.c
> +++ b/drivers/firmware/meson/meson_sm.c
> @@ -13,9 +13,10 @@
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> +#include <linux/of_platform.h>
> #include <linux/platform_device.h>
> #include <linux/printk.h>
> +#include <linux/property.h>
> #include <linux/types.h>
> #include <linux/sizes.h>
> #include <linux/slab.h>
> @@ -297,7 +298,7 @@ static int __init meson_sm_probe(struct platform_device *pdev)
> if (!fw)
> return -ENOMEM;
>
> - chip = of_match_device(meson_sm_ids, dev)->data;
> + chip = device_get_match_data(dev);
> if (!chip)
> return -EINVAL;
>
Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>
Powered by blists - more mailing lists