Skip to content

Commit 55ee6a9

Browse files
mripardbebarino
authored andcommitted
clk: bcm: rpi: Switch to clk_hw_register_clkdev
Since we don't care about retrieving the clk_lookup structure pointer returned by clkdev_hw_create, we can just use the clk_hw_register_clkdev function. 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/59f6208b6fe3367e735b0cca4f65c2c937639af9.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd <[email protected]>
1 parent 8f60112 commit 55ee6a9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/clk/bcm/clk-raspberrypi.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ static struct clk_fixed_factor raspberrypi_clk_pllb_arm = {
237237

238238
static int raspberrypi_register_pllb_arm(struct raspberrypi_clk *rpi)
239239
{
240-
struct clk_lookup *pllb_arm_lookup;
241240
int ret;
242241

243242
ret = devm_clk_hw_register(rpi->dev, &raspberrypi_clk_pllb_arm.hw);
@@ -246,11 +245,11 @@ static int raspberrypi_register_pllb_arm(struct raspberrypi_clk *rpi)
246245
return ret;
247246
}
248247

249-
pllb_arm_lookup = clkdev_hw_create(&raspberrypi_clk_pllb_arm.hw,
250-
NULL, "cpu0");
251-
if (!pllb_arm_lookup) {
252-
dev_err(rpi->dev, "Failed to initialize pllb_arm_lookup\n");
253-
return -ENOMEM;
248+
ret = clk_hw_register_clkdev(&raspberrypi_clk_pllb_arm.hw,
249+
NULL, "cpu0");
250+
if (ret) {
251+
dev_err(rpi->dev, "Failed to initialize clkdev\n");
252+
return ret;
254253
}
255254

256255
return 0;

0 commit comments

Comments
 (0)