mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 22:31:32 +00:00
clk: tegra: Use tegra_clk_register_periph_data()
Instead of open-coding the same pattern repeatedly, reuse the newly introduced tegra_clk_register_periph_data() helper that will unpack the initialization structure. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
8be95190da
commit
1d7e2c8e54
@ -927,10 +927,7 @@ static void __init periph_clk_init(void __iomem *clk_base,
|
||||
continue;
|
||||
|
||||
data->periph.gate.regs = bank;
|
||||
clk = tegra_clk_register_periph(data->name,
|
||||
data->p.parent_names, data->num_parents,
|
||||
&data->periph, clk_base, data->offset,
|
||||
data->flags);
|
||||
clk = tegra_clk_register_periph_data(clk_base, data);
|
||||
*dt_clk = clk;
|
||||
}
|
||||
}
|
||||
|
@ -1092,9 +1092,7 @@ static __init void tegra114_periph_clk_init(void __iomem *clk_base,
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tegra_periph_clk_list); i++) {
|
||||
data = &tegra_periph_clk_list[i];
|
||||
clk = tegra_clk_register_periph(data->name,
|
||||
data->p.parent_names, data->num_parents,
|
||||
&data->periph, clk_base, data->offset, data->flags);
|
||||
clk = tegra_clk_register_periph_data(clk_base, data);
|
||||
clks[data->clk_id] = clk;
|
||||
}
|
||||
|
||||
|
@ -850,9 +850,7 @@ static void __init tegra20_periph_clk_init(void)
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tegra_periph_clk_list); i++) {
|
||||
data = &tegra_periph_clk_list[i];
|
||||
clk = tegra_clk_register_periph(data->name, data->p.parent_names,
|
||||
data->num_parents, &data->periph,
|
||||
clk_base, data->offset, data->flags);
|
||||
clk = tegra_clk_register_periph_data(clk_base, data);
|
||||
clks[data->clk_id] = clk;
|
||||
}
|
||||
|
||||
|
@ -1079,9 +1079,7 @@ static void __init tegra30_periph_clk_init(void)
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tegra_periph_clk_list); i++) {
|
||||
data = &tegra_periph_clk_list[i];
|
||||
clk = tegra_clk_register_periph(data->name, data->p.parent_names,
|
||||
data->num_parents, &data->periph,
|
||||
clk_base, data->offset, data->flags);
|
||||
clk = tegra_clk_register_periph_data(clk_base, data);
|
||||
clks[data->clk_id] = clk;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user