diff options
author | Tero Kristo <t-kristo@ti.com> | 2015-04-27 21:55:42 +0300 |
---|---|---|
committer | Tero Kristo <t-kristo@ti.com> | 2015-06-02 12:31:46 +0300 |
commit | e9e63088e4f93cf4ed7999294c09905b7dcb4d32 (patch) | |
tree | e22481c9cc1c77e98cb34dd484bdd2b977ea0a96 /arch/arm/mach-omap2/clock.c | |
parent | 9e11814ab8f08a0932c583b9e1504acac52ec7b3 (diff) |
clk: ti: remove exported ll_ops struct, instead add an API for registration
We should avoid exporting data from drivers, instead use an API for
registering the clock low level operations.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 99875dba803a..40a88c2e4016 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -113,6 +113,19 @@ static struct ti_clk_ll_ops omap_clk_ll_ops = { }; /** + * omap2_clk_setup_ll_ops - setup clock driver low-level ops + * + * Sets up clock driver low-level platform ops. These are needed + * for register accesses and various other misc platform operations. + * Returns 0 on success, -EBUSY if low level ops have been registered + * already. + */ +int __init omap2_clk_setup_ll_ops(void) +{ + return ti_clk_setup_ll_ops(&omap_clk_ll_ops); +} + +/** * omap2_clk_provider_init - initialize a clock provider * @match_table: DT device table to match for devices to init * @np: device node pointer for the this clock provider @@ -130,8 +143,6 @@ int __init omap2_clk_provider_init(struct device_node *np, int index, { struct clk_iomap *io; - ti_clk_ll_ops = &omap_clk_ll_ops; - io = kzalloc(sizeof(*io), GFP_KERNEL); io->regmap = syscon; @@ -155,8 +166,6 @@ void __init omap2_clk_legacy_provider_init(int index, void __iomem *mem) { struct clk_iomap *io; - ti_clk_ll_ops = &omap_clk_ll_ops; - io = memblock_virt_alloc(sizeof(*io), 0); io->mem = mem; |