Skip to content

Commit 8f60112

Browse files
mripardbebarino
authored andcommitted
clk: bcm: rpi: Remove pllb_arm_lookup global pointer
The pllb_arm_lookup pointer in the struct raspberrypi_clk is not used for anything but to store the returned pointer to clkdev_hw_create, and is not used anywhere else in the driver. Let's remove that global pointer from the structure. Cc: Michael Turquette <[email protected]> Cc: [email protected] Acked-by: Nicolas Saenz Julienne <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Nicolas Saenz Julienne <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/189407f54906d2b07c91de7a4eeb6d8c8934280f.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd <[email protected]>
1 parent 683de18 commit 8f60112

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/clk/bcm/clk-raspberrypi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ struct raspberrypi_clk {
4040
unsigned long max_rate;
4141

4242
struct clk_hw pllb;
43-
struct clk_lookup *pllb_arm_lookup;
4443
};
4544

4645
/*
@@ -238,6 +237,7 @@ static struct clk_fixed_factor raspberrypi_clk_pllb_arm = {
238237

239238
static int raspberrypi_register_pllb_arm(struct raspberrypi_clk *rpi)
240239
{
240+
struct clk_lookup *pllb_arm_lookup;
241241
int ret;
242242

243243
ret = devm_clk_hw_register(rpi->dev, &raspberrypi_clk_pllb_arm.hw);
@@ -246,9 +246,9 @@ static int raspberrypi_register_pllb_arm(struct raspberrypi_clk *rpi)
246246
return ret;
247247
}
248248

249-
rpi->pllb_arm_lookup = clkdev_hw_create(&raspberrypi_clk_pllb_arm.hw,
250-
NULL, "cpu0");
251-
if (!rpi->pllb_arm_lookup) {
249+
pllb_arm_lookup = clkdev_hw_create(&raspberrypi_clk_pllb_arm.hw,
250+
NULL, "cpu0");
251+
if (!pllb_arm_lookup) {
252252
dev_err(rpi->dev, "Failed to initialize pllb_arm_lookup\n");
253253
return -ENOMEM;
254254
}

0 commit comments

Comments
 (0)