bcm27xx: update to latest patches from RPi foundation
[oweals/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0519-clk-bcm-rpi-Remove-global-pllb_arm-clock-pointer.patch
1 From 5272507555c0ecf02c0dfd78303e86e8eb096191 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Fri, 7 Feb 2020 15:41:37 +0100
4 Subject: [PATCH] clk: bcm: rpi: Remove global pllb_arm clock pointer
5
6 The pllb_arm clk_hw pointer in the raspberry_clk structure isn't used
7 anywhere but in the raspberrypi_register_pllb_arm.
8
9 Let's remove it, this will make our lives easier in future patches.
10
11 Cc: Michael Turquette <mturquette@baylibre.com>
12 Cc: Stephen Boyd <sboyd@kernel.org>
13 Cc: linux-clk@vger.kernel.org
14 Acked-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
15 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
16 ---
17  drivers/clk/bcm/clk-raspberrypi.c | 7 +++----
18  1 file changed, 3 insertions(+), 4 deletions(-)
19
20 --- a/drivers/clk/bcm/clk-raspberrypi.c
21 +++ b/drivers/clk/bcm/clk-raspberrypi.c
22 @@ -40,7 +40,6 @@ struct raspberrypi_clk {
23         unsigned long max_rate;
24  
25         struct clk_hw pllb;
26 -       struct clk_hw *pllb_arm;
27         struct clk_lookup *pllb_arm_lookup;
28  };
29  
30 @@ -246,12 +245,12 @@ static int raspberrypi_register_pllb_arm
31                 dev_err(rpi->dev, "Failed to initialize pllb_arm\n");
32                 return ret;
33         }
34 -       rpi->pllb_arm = &raspberrypi_clk_pllb_arm.hw;
35  
36 -       rpi->pllb_arm_lookup = clkdev_hw_create(rpi->pllb_arm, NULL, "cpu0");
37 +       rpi->pllb_arm_lookup = clkdev_hw_create(&raspberrypi_clk_pllb_arm.hw,
38 +                                               NULL, "cpu0");
39         if (!rpi->pllb_arm_lookup) {
40                 dev_err(rpi->dev, "Failed to initialize pllb_arm_lookup\n");
41 -               clk_hw_unregister_fixed_factor(rpi->pllb_arm);
42 +               clk_hw_unregister_fixed_factor(&raspberrypi_clk_pllb_arm.hw);
43                 return -ENOMEM;
44         }
45