[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181106210933.GU24212@piout.net>
Date: Tue, 6 Nov 2018 22:09:33 +0100
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Claudiu.Beznea@...rochip.com
Cc: sre@...nel.org, Nicolas.Ferre@...rochip.com,
linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] power: reset: at91-poweroff: move shdwc related data
to one structure
Hi Claudiu,
On 05/11/2018 11:14:26+0000, Claudiu.Beznea@...rochip.com wrote:
> static int __init at91_poweroff_probe(struct platform_device *pdev)
> @@ -154,16 +160,22 @@ static int __init at91_poweroff_probe(struct platform_device *pdev)
> u32 ddr_type;
> int ret;
>
> + at91_shdwc = devm_kzalloc(&pdev->dev, sizeof(*at91_shdwc), GFP_KERNEL);
> + if (!at91_shdwc)
> + return -ENOMEM;
> +
Is there any real benefit that will offset the time lost for that
allocation at boot time?
I understand you are then testing at91_shdwc to know whether the driver
already probed once. But, the driver will never probe twice as there is
only one shutdown controller on the SoC and anyway, If it was to probe
twice, it will still work as expected.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists