[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <affd68499ff843e8f3e0d18890699e18cde7582e.camel@suse.de>
Date: Thu, 30 Apr 2020 18:27:58 +0200
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: Maxime Ripard <maxime@...no.tech>, Eric Anholt <eric@...olt.net>
Cc: dri-devel@...ts.freedesktop.org,
linux-rpi-kernel@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
Tim Gover <tim.gover@...pberrypi.com>,
Phil Elwell <phil@...pberrypi.com>
Subject: Re: [PATCH v2 04/91] firmware: rpi: Only create clocks device if we
don't have a node for it
On Fri, 2020-04-24 at 17:33 +0200, Maxime Ripard wrote:
> The firmware clocks driver was previously probed through a platform_device
> created by the firmware driver.
>
> Since we will now have a node for that clocks driver, we need to create the
> device only in the case where there's no node for it already.
>
> Signed-off-by: Maxime Ripard <maxime@...no.tech>
> ---
> drivers/firmware/raspberrypi.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
> index da26a584dca0..1874f41b007c 100644
> --- a/drivers/firmware/raspberrypi.c
> +++ b/drivers/firmware/raspberrypi.c
> @@ -210,6 +210,15 @@ rpi_register_hwmon_driver(struct device *dev, struct
> rpi_firmware *fw)
>
> static void rpi_register_clk_driver(struct device *dev)
> {
> + /*
> + * Earlier DTs don't have a node for the firmware clocks but
> + * rely on us creating a platform device by hand. If we do
> + * have a node for the firmware clocks, just bail out here.
> + */
> + if (of_get_compatible_child(dev->of_node,
> + "raspberrypi,firmware-clocks"))
In the case you find a compatible device node you have to decrement the
refcount of_get_compatible_child() increased before leaving.
Regards,
Nicolas
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists