Linux clock framework development
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Stephen Boyd <sboyd@kernel.org>,
	linux-kernel@vger.kernel.org, stefan.wahren@i2se.com
Cc: linux-arm-kernel@lists.infradead.org, f.fainelli@gmail.com,
	ptesarik@suse.com, viresh.kumar@linaro.org,
	mturquette@baylibre.com, linux-pm@vger.kernel.org,
	rjw@rjwysocki.net, eric@anholt.net,
	bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	mbrugger@suse.de, ssuloev@orpaltech.com
Subject: Re: [PATCH v2 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq
Date: Thu, 06 Jun 2019 19:16:56 +0200	[thread overview]
Message-ID: <2dd0a516bbfe6150112ec7dc5f7d4d85cbe3cd03.camel@suse.de> (raw)
In-Reply-To: <20190606170505.39C5B20693@mail.kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]

On Thu, 2019-06-06 at 10:05 -0700, Stephen Boyd wrote:
> Quoting Nicolas Saenz Julienne (2019-06-06 07:22:58)
> > diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-
> > raspberrypi.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;
> >  
> > +static struct platform_device *rpi_cpufreq;
> 
> Why can't this be stored in platform driver data?

It actually could, I just followed the same pattern as the code found in patch
#3. I'll update it in the next version if you prefer it. 

> 
> > +
> >  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_device
> > *pdev)
> >                 return ret;
> >         }
> >  
> > +       rpi_cpufreq = platform_device_register_data(dev, "raspberrypi-
> > cpufreq",
> > +                                                   -1, NULL, 0);
> > +
> > +       return 0;
> > +}
> > +
> > +static int raspberrypi_clk_remove(struct platform_device *pdev)
> > +{
> > +       platform_device_unregister(rpi_cpufreq);
> > +       rpi_cpufreq = NULL;
> 
> This assignment to NULL looks unnecessary.
> 

Same as above, but now that you pointed out, it's true it doesn't have any
effect

> > +
> >         return 0;
> >  }
> >  
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-06-06 17:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 14:22 [PATCH v2 0/7] cpufreq support for Raspberry Pi Nicolas Saenz Julienne
2019-06-06 14:22 ` [PATCH v2 1/7] clk: bcm2835: remove pllb Nicolas Saenz Julienne
2019-06-06 14:22 ` [PATCH v2 2/7] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware Nicolas Saenz Julienne
2019-06-06 14:42   ` Nicolas Saenz Julienne
2019-06-07  9:26   ` Stefan Wahren
2019-06-07  9:42     ` Nicolas Saenz Julienne
2019-06-07 10:04       ` Stefan Wahren
2019-06-06 14:22 ` [PATCH v2 3/7] firmware: raspberrypi: register clk device Nicolas Saenz Julienne
2019-06-06 14:22 ` [PATCH v2 4/7] cpufreq: add driver for Raspbery Pi Nicolas Saenz Julienne
2019-06-06 17:09   ` Stephen Boyd
2019-06-06 17:22     ` Nicolas Saenz Julienne
2019-06-06 17:36       ` Stephen Boyd
2019-06-06 18:10         ` Nicolas Saenz Julienne
2019-06-06 18:23           ` Stephen Boyd
2019-06-06 18:31             ` Nicolas Saenz Julienne
2019-06-07  3:09             ` Viresh Kumar
2019-06-07  9:13               ` Stefan Wahren
2019-06-07 19:02                 ` Stephen Boyd
2019-06-07 11:42   ` Stefan Wahren
2019-06-07 11:57     ` Nicolas Saenz Julienne
2019-06-06 14:22 ` [PATCH v2 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq Nicolas Saenz Julienne
2019-06-06 17:05   ` Stephen Boyd
2019-06-06 17:16     ` Nicolas Saenz Julienne [this message]
2019-06-06 17:20       ` Stephen Boyd
2019-06-06 14:22 ` [PATCH v2 6/7] ARM: defconfig: enable cpufreq driver for RPi Nicolas Saenz Julienne
2019-06-07 11:30   ` Stefan Wahren
2019-06-06 14:23 ` [PATCH v2 7/7] arm64: defconfig: enable cpufreq support for RPi3 Nicolas Saenz Julienne
2019-06-07 10:19   ` Stefan Wahren
2019-06-07 10:25     ` Nicolas Saenz Julienne
2019-06-08 10:43 ` [PATCH v2 0/7] cpufreq support for Raspberry Pi Stefan Wahren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2dd0a516bbfe6150112ec7dc5f7d4d85cbe3cd03.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mbrugger@suse.de \
    --cc=mturquette@baylibre.com \
    --cc=ptesarik@suse.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=ssuloev@orpaltech.com \
    --cc=stefan.wahren@i2se.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox