From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CBA0C47254 for ; Fri, 1 May 2020 07:24:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D2E6208C3 for ; Fri, 1 May 2020 07:24:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D2E6208C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B62246EC1F; Fri, 1 May 2020 07:23:45 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B6716E933 for ; Thu, 30 Apr 2020 16:28:01 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 69D85AC92; Thu, 30 Apr 2020 16:27:59 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2 04/91] firmware: rpi: Only create clocks device if we don't have a node for it From: Nicolas Saenz Julienne To: Maxime Ripard , Eric Anholt Date: Thu, 30 Apr 2020 18:27:58 +0200 In-Reply-To: References: User-Agent: Evolution 3.36.2 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 01 May 2020 07:22:25 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Gover , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Phil Elwell , linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============1865588302==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============1865588302== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-8iAI6Ck2SuZD2phx19xp" --=-8iAI6Ck2SuZD2phx19xp Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2020-04-24 at 17:33 +0200, Maxime Ripard wrote: > The firmware clocks driver was previously probed through a platform_devic= e > created by the firmware driver. >=20 > Since we will now have a node for that clocks driver, we need to create t= he > device only in the case where there's no node for it already. >=20 > Signed-off-by: Maxime Ripard > --- > drivers/firmware/raspberrypi.c | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberryp= i.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) > =20 > 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 --=-8iAI6Ck2SuZD2phx19xp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl6q/I4ACgkQlfZmHno8 x/7lFAf/ZpNeGVs0IJARqWX4JgGzfAueqaUdKpDNTfmLeklqw80t61otAkXEg88E 4MPVJnyIQvyPVDN0mgKg34bytiAYby8jadKUe9/H2e6eCkQ4+5XL2OiJBdsDZtrO 61TiPBWTOLY4c6Kixyx+0zGElXfcvZF+RLN37NqZVKG0JAsebwUWIbCxLKuf9cWj KSMYL2iNFNs6RYVctEdLh5pFAnaEtA14Gg9sJlpXO718MS+UBsa5wRmlN973IWUO u8PqR317lotzyFeD1U5iuaWSBPsuZKbQYLhLh2/UXoCpBbLZeV/5wp64hxpBh1vF XU33W6eYeOM9fRbgMKq74VUDZlf1DA== =+5W0 -----END PGP SIGNATURE----- --=-8iAI6Ck2SuZD2phx19xp-- --===============1865588302== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1865588302==--