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