Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8530334ybi; Thu, 6 Jun 2019 14:06:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXQ6zPqumSoSN+TnaPSAznnSruD/SlCgmzAi//mT4z0mr8b2Zt1iMlcxViQJ9LvwVM094N X-Received: by 2002:a17:902:a415:: with SMTP id p21mr17690236plq.290.1559855191677; Thu, 06 Jun 2019 14:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559855191; cv=none; d=google.com; s=arc-20160816; b=nn5l90SWDSn6GmsDh4Vyu6nOam3Ed67dhVxDmeEUUMX3W5YAA0+xKeOyKgDzQFqhP7 w1LTJm8Ugdu8QCeuS+2atMLeLykX/LuPsoKw+0mQlxwApV1xBSyMPx1lRM3p56vUcpCW oSUkx6mNLuZMZLmJa5v7V7N5rGARHVIcdqvDtkhQRBbwCugl69dM8RpJvHMhhauQXqLk pt5b7Zc0mSWCO9oiexnO3sJyKeyW6yPNNNF2aJLOI6bkB1bHgM1sXQ8cSFWPp4Z2aYmU 579DIaNGEjF1yZct29yPXZNImULnMtuxMm9WblfDBQ3Mzmhkw6aGrl8uI596T3weS3h6 q4fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:cc:from :subject:to:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=fhmnePDOj+VW6aty5VISYKOLDhsONI8zjlzwxo8uL24=; b=ILEjq9h1z3IejkDamkZhpdnZQclk1rL8y2kU9MXGXPQxzC8kc7bEyyr0x5QIfb66a7 544LEbkanhPeEArOHsVH5XkTOV62Lek3hK2dmqsXV1EWSYn4dKsGoB0O4JGFl7qQ7iy9 1bZKZTU8RSFNW7d9K31PN5ag1ZMPMskcZ3urPKeRWwEe4ZpgVMDDIUxQPRWZmZMp4y4C mSR8PvJ/anc3lfsM99ma+cmqXcABPsfSrgN983eMGDCpauebVqlrhouyiN5zeeTwNG9C cUVUq7RyntzppoEY8VJ2nUV9yWGGAWG4x5yxIkVW2bO5cCoG4ffPEnJin4nkitOFnkyd LVBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LJouhF83; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a69si140791pla.178.2019.06.06.14.06.15; Thu, 06 Jun 2019 14:06:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LJouhF83; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727471AbfFFRFG (ORCPT + 99 others); Thu, 6 Jun 2019 13:05:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:43938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbfFFRFG (ORCPT ); Thu, 6 Jun 2019 13:05:06 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 39C5B20693; Thu, 6 Jun 2019 17:05:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559840705; bh=uHOnF18rQ1x4hUh7PQwXCuloLsMPslXGMYzeeFg/e18=; h=In-Reply-To:References:To:Subject:From:Cc:Date:From; b=LJouhF834bm0oyjp4K3HMzEfmeO/CynTLHON+s66xYLMS9rlFer55d4RIjFRsHe0h sKukE1s08fJcwj3HnI+19EmuFXk7pOcCRuTS5VjlCZQhSB64usa6fFp9BL+hN4jdCs OtnljmrrtAcwblV5a0vLj2vb6pEVb4Bf3VNMrNAA= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190606142255.29454-6-nsaenzjulienne@suse.de> References: <20190606142255.29454-1-nsaenzjulienne@suse.de> <20190606142255.29454-6-nsaenzjulienne@suse.de> To: Nicolas Saenz Julienne , linux-kernel@vger.kernel.org, stefan.wahren@i2se.com Subject: Re: [PATCH v2 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq From: Stephen Boyd Cc: mbrugger@suse.de, viresh.kumar@linaro.org, rjw@rjwysocki.net, eric@anholt.net, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, ptesarik@suse.com, linux-rpi-kernel@lists.infradead.org, ssuloev@orpaltech.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mturquette@baylibre.com, linux-pm@vger.kernel.org, Nicolas Saenz Julienne User-Agent: alot/0.8.1 Date: Thu, 06 Jun 2019 10:05:04 -0700 Message-Id: <20190606170505.39C5B20693@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Nicolas Saenz Julienne (2019-06-06 07:22:58) > diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-rasp= berrypi.c > index b1365cf19f3a..052296b5fbe4 100644 > --- a/drivers/clk/bcm/clk-raspberrypi.c > +++ b/drivers/clk/bcm/clk-raspberrypi.c > @@ -63,6 +63,8 @@ struct raspberrypi_firmware_prop { > __le32 disable_turbo; > } __packed; > =20 > +static struct platform_device *rpi_cpufreq; Why can't this be stored in platform driver data? > + > static int raspberrypi_clock_property(struct rpi_firmware *firmware, u32= tag, > u32 clk, u32 *val) > { > @@ -285,6 +287,17 @@ static int raspberrypi_clk_probe(struct platform_dev= ice *pdev) > return ret; > } > =20 > + rpi_cpufreq =3D platform_device_register_data(dev, "raspberrypi-c= pufreq", > + -1, NULL, 0); > + > + return 0; > +} > + > +static int raspberrypi_clk_remove(struct platform_device *pdev) > +{ > + platform_device_unregister(rpi_cpufreq); > + rpi_cpufreq =3D NULL; This assignment to NULL looks unnecessary. > + > return 0; > } > =20