[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH3L5QqPqb8GhK6J8iM7-fHZ7Yb4d0aU-1MzduRhO76BqR403Q@mail.gmail.com>
Date: Mon, 7 Aug 2023 20:32:06 +0300
From: Alexandru Ardelean <alex@...uggie.ro>
To: Andrei Coardos <aboutphysycs@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
alexandre.belloni@...tlin.com, a.zummo@...ertech.it,
sebastian.hesselbarth@...il.com, gregory.clement@...tlin.com,
andrew@...n.ch
Subject: Re: [PATCH] rtc: armada38x: remove unneeded call to platform_set_drvdata()
On Mon, Aug 7, 2023 at 3:48 PM Andrei Coardos <aboutphysycs@...il.com> wrote:
>
> This function call was found to be unnecessary as there is no equivalent
> platform_get_drvdata() call to access the private data of the driver. Also,
> the private data is defined in this driver, so there is no risk of it being
> accessed outside of this driver file.
>
NAK on this.
This still calls dev_get_drvdata() in PM routines to access the private data.
> Signed-off-by: Andrei Coardos <aboutphysycs@...il.com>
> ---
> drivers/rtc/rtc-armada38x.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
> index b4139c200676..5ed028429565 100644
> --- a/drivers/rtc/rtc-armada38x.c
> +++ b/drivers/rtc/rtc-armada38x.c
> @@ -527,7 +527,6 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
> dev_warn(&pdev->dev, "Interrupt not available.\n");
> rtc->irq = -1;
> }
> - platform_set_drvdata(pdev, rtc);
>
> if (rtc->irq != -1)
> device_init_wakeup(&pdev->dev, 1);
> --
> 2.34.1
>
Powered by blists - more mailing lists