Skip to content

Commit 2607133

Browse files
SiFiveHollandbebarino
authored andcommitted
clk: sifive: Do not register clkdevs for PRCI clocks
These clkdevs were unnecessary, because systems using this driver always look up clocks using the devicetree. And as Russell King points out[1], since the provided device name was truncated, lookups via clkdev would never match. Recently, commit 8d53252 ("clkdev: report over-sized strings when creating clkdev entries") caused clkdev registration to fail due to the truncation, and this now prevents the driver from probing. Fix the driver by removing the clkdev registration. Link: https://lore.kernel.org/linux-clk/[email protected]/ [1] Fixes: 30b8e27 ("clk: sifive: add a driver for the SiFive FU540 PRCI IP block") Fixes: 8d53252 ("clkdev: report over-sized strings when creating clkdev entries") Reported-by: Guenter Roeck <[email protected]> Closes: https://lore.kernel.org/linux-clk/[email protected]/ Suggested-by: Russell King <[email protected]> Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 1613e60 commit 2607133

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

drivers/clk/sifive/sifive-prci.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Copyright (C) 2020 Zong Li
55
*/
66

7-
#include <linux/clkdev.h>
87
#include <linux/delay.h>
98
#include <linux/io.h>
109
#include <linux/module.h>
@@ -537,13 +536,6 @@ static int __prci_register_clocks(struct device *dev, struct __prci_data *pd,
537536
return r;
538537
}
539538

540-
r = clk_hw_register_clkdev(&pic->hw, pic->name, dev_name(dev));
541-
if (r) {
542-
dev_warn(dev, "Failed to register clkdev for %s: %d\n",
543-
init.name, r);
544-
return r;
545-
}
546-
547539
pd->hw_clks.hws[i] = &pic->hw;
548540
}
549541

0 commit comments

Comments
 (0)