lkml.org 
[lkml]   [2019]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 5/7] clk: raspberrypi: register platform device for raspberrypi-cpufreq
From
Date
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?

> +
> 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.

> +
> return 0;
> }
>

\
 
 \ /
  Last update: 2019-06-06 19:06    [W:0.858 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site