ARM: omap2: use clkdev_create()
Rather than open coding the clkdev allocation, initialisation and addition, use the clkdev_create() helper. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
4dbc02302b
commit
b2e0112946
1 changed files with 2 additions and 10 deletions
|
@ -232,14 +232,12 @@ void omap2xxx_clkt_vps_init(void)
|
||||||
struct clk_hw_omap *hw = NULL;
|
struct clk_hw_omap *hw = NULL;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
const char *parent_name = "mpu_ck";
|
const char *parent_name = "mpu_ck";
|
||||||
struct clk_lookup *lookup = NULL;
|
|
||||||
|
|
||||||
omap2xxx_clkt_vps_late_init();
|
omap2xxx_clkt_vps_late_init();
|
||||||
omap2xxx_clkt_vps_check_bootloader_rates();
|
omap2xxx_clkt_vps_check_bootloader_rates();
|
||||||
|
|
||||||
hw = kzalloc(sizeof(*hw), GFP_KERNEL);
|
hw = kzalloc(sizeof(*hw), GFP_KERNEL);
|
||||||
lookup = kzalloc(sizeof(*lookup), GFP_KERNEL);
|
if (!hw)
|
||||||
if (!hw || !lookup)
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
init.name = "virt_prcm_set";
|
init.name = "virt_prcm_set";
|
||||||
init.ops = &virt_prcm_set_ops;
|
init.ops = &virt_prcm_set_ops;
|
||||||
|
@ -249,15 +247,9 @@ void omap2xxx_clkt_vps_init(void)
|
||||||
hw->hw.init = &init;
|
hw->hw.init = &init;
|
||||||
|
|
||||||
clk = clk_register(NULL, &hw->hw);
|
clk = clk_register(NULL, &hw->hw);
|
||||||
|
clkdev_create(clk, "cpufreq_ck", NULL);
|
||||||
lookup->dev_id = NULL;
|
|
||||||
lookup->con_id = "cpufreq_ck";
|
|
||||||
lookup->clk = clk;
|
|
||||||
|
|
||||||
clkdev_add(lookup);
|
|
||||||
return;
|
return;
|
||||||
cleanup:
|
cleanup:
|
||||||
kfree(hw);
|
kfree(hw);
|
||||||
kfree(lookup);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue