diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-14 13:35:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:43:47 +0100 |
commit | c0afc799fb9a19a11f651596fe23b4b755593887 (patch) | |
tree | 9c27f1533193d31757744b22b2af9186d23e67ed /drivers/clk | |
parent | e70b9d7a74698f1374244b2251216428db920aed (diff) | |
download | barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.gz barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.xz |
Rename struct device_d to device
The '_d' suffix was originally introduced in case we want to import
Linux struct device as a separate struct into barebox. Over time it
became clear that this won't happen, instead barebox struct device_d
is basically the same as Linux struct device. Rename the struct name
accordingly to make porting Linux code easier.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/clk')
43 files changed, 158 insertions, 133 deletions
diff --git a/drivers/clk/bcm/clk-bcm2835-aux.c b/drivers/clk/bcm/clk-bcm2835-aux.c index b4636b850e..39d61a429e 100644 --- a/drivers/clk/bcm/clk-bcm2835-aux.c +++ b/drivers/clk/bcm/clk-bcm2835-aux.c @@ -13,7 +13,7 @@ #define BCM2835_AUXIRQ 0x00 #define BCM2835_AUXENB 0x04 -static int bcm2835_aux_clk_probe(struct device_d *dev) +static int bcm2835_aux_clk_probe(struct device *dev) { struct clk_hw_onecell_data *onecell; const char *parent; diff --git a/drivers/clk/clk-ar933x.c b/drivers/clk/clk-ar933x.c index 372a9e7457..cc43f1ab35 100644 --- a/drivers/clk/clk-ar933x.c +++ b/drivers/clk/clk-ar933x.c @@ -104,7 +104,7 @@ static void ar933x_pll_init(void __iomem *base) AR933X_PLL_CLOCK_CTRL_AHB_DIV_MASK); } -static int ar933x_clk_probe(struct device_d *dev) +static int ar933x_clk_probe(struct device *dev) { struct resource *iores; void __iomem *base; diff --git a/drivers/clk/clk-ar9344.c b/drivers/clk/clk-ar9344.c index 5bb55d2227..8afce4f72e 100644 --- a/drivers/clk/clk-ar9344.c +++ b/drivers/clk/clk-ar9344.c @@ -99,7 +99,7 @@ static void ar9344_pll_init(void __iomem *base) clks[ATH79_CLK_CPU] = clk_ar9344("cpu", "ref", base); } -static int ar9344_clk_probe(struct device_d *dev) +static int ar9344_clk_probe(struct device *dev) { struct resource *iores; void __iomem *base; diff --git a/drivers/clk/clk-bulk.c b/drivers/clk/clk-bulk.c index f6fe07a0bf..37982db9aa 100644 --- a/drivers/clk/clk-bulk.c +++ b/drivers/clk/clk-bulk.c @@ -23,7 +23,7 @@ void clk_bulk_put(int num_clks, struct clk_bulk_data *clks) } EXPORT_SYMBOL_GPL(clk_bulk_put); -static int __clk_bulk_get(struct device_d *dev, int num_clks, +static int __clk_bulk_get(struct device *dev, int num_clks, struct clk_bulk_data *clks, bool optional) { @@ -58,14 +58,14 @@ err: return ret; } -int __must_check clk_bulk_get(struct device_d *dev, int num_clks, +int __must_check clk_bulk_get(struct device *dev, int num_clks, struct clk_bulk_data *clks) { return __clk_bulk_get(dev, num_clks, clks, false); } EXPORT_SYMBOL(clk_bulk_get); -int __must_check clk_bulk_get_optional(struct device_d *dev, int num_clks, +int __must_check clk_bulk_get_optional(struct device *dev, int num_clks, struct clk_bulk_data *clks) { return __clk_bulk_get(dev, num_clks, clks, true); @@ -140,7 +140,7 @@ void clk_bulk_put_all(int num_clks, struct clk_bulk_data *clks) } EXPORT_SYMBOL(clk_bulk_put_all); -int __must_check clk_bulk_get_all(struct device_d *dev, +int __must_check clk_bulk_get_all(struct device *dev, struct clk_bulk_data **clks) { struct device_node *np = dev->of_node; diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c index 4ebdd399b4..45dec790d7 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -172,13 +172,17 @@ err: return 0; } -struct clk_hw *clk_hw_register_composite(struct device_d *dev, - const char *name, const char * const *parent_names, - int num_parents, - struct clk_hw *mux_hw, const struct clk_ops *mux_ops, - struct clk_hw *rate_hw, const struct clk_ops *rate_ops, - struct clk_hw *gate_hw, const struct clk_ops *gate_ops, - unsigned long flags) +struct clk_hw *clk_hw_register_composite(struct device *dev, + const char *name, + const char * const *parent_names, + int num_parents, + struct clk_hw *mux_hw, + const struct clk_ops *mux_ops, + struct clk_hw *rate_hw, + const struct clk_ops *rate_ops, + struct clk_hw *gate_hw, + const struct clk_ops *gate_ops, + unsigned long flags) { struct clk *clk; diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index fed9ad9d24..e095b40bfa 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -410,40 +410,48 @@ struct clk *clk_divider_table(const char *name, const char *parent, return &div->hw.clk; } -struct clk *clk_register_divider_table(struct device_d *dev, const char *name, - const char *parent_name, unsigned long flags, - void __iomem *reg, u8 shift, u8 width, - u8 clk_divider_flags, const struct clk_div_table *table, - spinlock_t *lock) +struct clk *clk_register_divider_table(struct device *dev, const char *name, + const char *parent_name, + unsigned long flags, + void __iomem *reg, u8 shift, u8 width, + u8 clk_divider_flags, + const struct clk_div_table *table, + spinlock_t *lock) { return clk_divider_table(name, parent_name, flags, reg, shift, width, table, clk_divider_flags); } -struct clk *clk_register_divider(struct device_d *dev, const char *name, - const char *parent_name, unsigned long flags, - void __iomem *reg, u8 shift, u8 width, - u8 clk_divider_flags, spinlock_t *lock) +struct clk *clk_register_divider(struct device *dev, const char *name, + const char *parent_name, unsigned long flags, + void __iomem *reg, u8 shift, u8 width, + u8 clk_divider_flags, spinlock_t *lock) { return clk_divider(name, parent_name, flags, reg, shift, width, clk_divider_flags); } -struct clk_hw *clk_hw_register_divider_table(struct device_d *dev, - const char *name, const char *parent_name, unsigned long flags, - void __iomem *reg, u8 shift, u8 width, - u8 clk_divider_flags, const struct clk_div_table *table, - spinlock_t *lock) +struct clk_hw *clk_hw_register_divider_table(struct device *dev, + const char *name, + const char *parent_name, + unsigned long flags, + void __iomem *reg, u8 shift, + u8 width, + u8 clk_divider_flags, + const struct clk_div_table *table, + spinlock_t *lock) { return clk_to_clk_hw(clk_register_divider_table(dev, xstrdup(name), xstrdup(parent_name), flags, reg, shift, width, clk_divider_flags, table, lock)); } -struct clk_hw *clk_hw_register_divider(struct device_d *dev, - const char *name, const char *parent_name, unsigned long flags, - void __iomem *reg, u8 shift, u8 width, - u8 clk_divider_flags, spinlock_t *lock) +struct clk_hw *clk_hw_register_divider(struct device *dev, + const char *name, + const char *parent_name, + unsigned long flags, + void __iomem *reg, u8 shift, u8 width, + u8 clk_divider_flags, spinlock_t *lock) { return clk_to_clk_hw(clk_register_divider(dev, xstrdup(name), xstrdup(parent_name), flags, reg, shift, width, diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index a6d3fdc6a1..d2c808d40c 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -77,16 +77,20 @@ struct clk *clk_fixed_factor(const char *name, return &f->hw.clk; } -struct clk *clk_register_fixed_factor(struct device_d *dev, const char *name, - const char *parent_name, unsigned long flags, - unsigned int mult, unsigned int div) +struct clk *clk_register_fixed_factor(struct device *dev, const char *name, + const char *parent_name, + unsigned long flags, + unsigned int mult, unsigned int div) { return clk_fixed_factor(name, parent_name, mult, div, flags); } -struct clk_hw *clk_hw_register_fixed_factor(struct device_d *dev, - const char *name, const char *parent_name, unsigned long flags, - unsigned int mult, unsigned int div) +struct clk_hw *clk_hw_register_fixed_factor(struct device *dev, + const char *name, + const char *parent_name, + unsigned long flags, + unsigned int mult, + unsigned int div) { return clk_to_clk_hw(clk_register_fixed_factor(dev, xstrdup(name), xstrdup(parent_name), diff --git a/drivers/clk/clk-fixed.c b/drivers/clk/clk-fixed.c index 9e5a07817b..6ec2feb84f 100644 --- a/drivers/clk/clk-fixed.c +++ b/drivers/clk/clk-fixed.c @@ -63,7 +63,7 @@ struct clk *clk_register_fixed_rate(const char *name, return &fix->hw.clk; } -struct clk_hw *clk_hw_register_fixed_rate(struct device_d *dev, +struct clk_hw *clk_hw_register_fixed_rate(struct device *dev, const char *name, const char *parent_name, unsigned long flags, unsigned long rate) { diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c index 3cfd707238..d31920fd0b 100644 --- a/drivers/clk/clk-gate.c +++ b/drivers/clk/clk-gate.c @@ -117,10 +117,10 @@ struct clk *clk_gate_inverted(const char *name, const char *parent, return clk_gate(name, parent, reg, shift, flags, CLK_GATE_SET_TO_DISABLE); } -struct clk *clk_register_gate(struct device_d *dev, const char *name, - const char *parent_name, unsigned long flags, - void __iomem *reg, u8 bit_idx, - u8 clk_gate_flags, spinlock_t *lock) +struct clk *clk_register_gate(struct device *dev, const char *name, + const char *parent_name, unsigned long flags, + void __iomem *reg, u8 bit_idx, + u8 clk_gate_flags, spinlock_t *lock) { return clk_gate(name, parent_name, reg, bit_idx, flags, clk_gate_flags); } diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index 8463f1ee82..ad82d97ea8 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -204,21 +204,23 @@ struct clk *clk_mux(const char *name, unsigned clk_flags, void __iomem *reg, return m; } -struct clk *clk_register_mux(struct device_d *dev, const char *name, - const char * const *parent_names, u8 num_parents, - unsigned long flags, - void __iomem *reg, u8 shift, u8 width, - u8 clk_mux_flags, spinlock_t *lock) +struct clk *clk_register_mux(struct device *dev, const char *name, + const char * const *parent_names, u8 num_parents, + unsigned long flags, + void __iomem *reg, u8 shift, u8 width, + u8 clk_mux_flags, spinlock_t *lock) { return clk_mux(name, flags, reg, shift, width, parent_names, num_parents, clk_mux_flags); } -struct clk_hw *__clk_hw_register_mux(struct device_d *dev, - const char *name, u8 num_parents, - const char * const *parent_names, - unsigned long flags, void __iomem *reg, u8 shift, u32 mask, - u8 clk_mux_flags, u32 *table, spinlock_t *lock) +struct clk_hw *__clk_hw_register_mux(struct device *dev, + const char *name, u8 num_parents, + const char * const *parent_names, + unsigned long flags, void __iomem *reg, + u8 shift, u32 mask, + u8 clk_mux_flags, u32 *table, + spinlock_t *lock) { struct clk_mux *mux; struct clk_hw *hw; diff --git a/drivers/clk/clk-rpi.c b/drivers/clk/clk-rpi.c index 1eae4540bb..b745518854 100644 --- a/drivers/clk/clk-rpi.c +++ b/drivers/clk/clk-rpi.c @@ -40,7 +40,7 @@ static struct clk *rpi_register_firmware_clock(u32 clock_id, const char *name) return clk_fixed(name, msg->get_clock_rate.body.resp.rate_hz); } -static int bcm2835_cprman_init(struct device_d *dev) +static int bcm2835_cprman_init(struct device *dev) { struct clk *clk_cs; @@ -50,9 +50,9 @@ static int bcm2835_cprman_init(struct device_d *dev) return 0; } -static int rpi_cprman_probe(struct device_d *dev) +static int rpi_cprman_probe(struct device *dev) { - int (*init)(struct device_d *dev); + int (*init)(struct device *dev); init = device_get_match_data(dev); if (init) { diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c index fcffe6a438..55141a7b54 100644 --- a/drivers/clk/clk-scmi.c +++ b/drivers/clk/clk-scmi.c @@ -101,7 +101,7 @@ static const struct clk_ops scmi_clk_ops = { .disable = scmi_clk_disable, }; -static int scmi_clk_ops_init(struct device_d *dev, struct scmi_clk *sclk) +static int scmi_clk_ops_init(struct device *dev, struct scmi_clk *sclk) { struct clk_init_data init = { .flags = CLK_GET_RATE_NOCACHE, @@ -119,7 +119,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev) int idx, count, err; struct clk **clks; struct clk_onecell_data *clk_data; - struct device_d *dev = &sdev->dev; + struct device *dev = &sdev->dev; struct device_node *np = dev->of_node; const struct scmi_handle *handle = sdev->handle; struct scmi_protocol_handle *ph; diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index 4611038f4b..4841d616f5 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -457,7 +457,7 @@ static const struct clk_ops clk_apb_mul_factor_ops = { .recalc_rate = clk_apb_mul_recalc_rate, }; -static struct clk *clk_register_apb_mul(struct device_d *dev, const char *name, +static struct clk *clk_register_apb_mul(struct device *dev, const char *name, const char *parent_name, unsigned long flags, u8 bit_idx) { @@ -952,10 +952,12 @@ static const struct clk_ops rgclk_ops = { .is_enabled = rgclk_is_enabled, }; -static struct clk_hw *clk_register_rgate(struct device_d *dev, const char *name, - const char *parent_name, unsigned long flags, - void __iomem *reg, u8 bit_idx, u8 bit_rdy_idx, - u8 clk_gate_flags, spinlock_t *lock) +static struct clk_hw *clk_register_rgate(struct device *dev, const char *name, + const char *parent_name, + unsigned long flags, + void __iomem *reg, u8 bit_idx, + u8 bit_rdy_idx, + u8 clk_gate_flags, spinlock_t *lock) { struct stm32_rgate *rgate; struct clk_init_data init = { NULL }; @@ -1047,10 +1049,13 @@ static const struct clk_ops cclk_mux_ops = { .set_parent = cclk_mux_set_parent, }; -static struct clk_hw *stm32_register_cclk(struct device_d *dev, const char *name, - const char * const *parent_names, int num_parents, - void __iomem *reg, u8 bit_idx, u8 shift, unsigned long flags, - spinlock_t *lock) +static struct clk_hw *stm32_register_cclk(struct device *dev, + const char *name, + const char * const *parent_names, + int num_parents, + void __iomem *reg, u8 bit_idx, + u8 shift, unsigned long flags, + spinlock_t *lock) { struct clk_hw *hw; struct clk_gate *gate; diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c index 6753a36890..93c77dfc72 100644 --- a/drivers/clk/clk-stm32mp1.c +++ b/drivers/clk/clk-stm32mp1.c @@ -320,7 +320,7 @@ struct clock_config { int num_parents; unsigned long flags; void *cfg; - struct clk_hw * (*func)(struct device_d *dev, + struct clk_hw * (*func)(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg); @@ -380,7 +380,7 @@ struct stm32_composite_cfg { }; static struct clk_hw * -_clk_hw_register_gate(struct device_d *dev, +_clk_hw_register_gate(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -398,7 +398,7 @@ _clk_hw_register_gate(struct device_d *dev, } static struct clk_hw * -_clk_hw_register_fixed_factor(struct device_d *dev, +_clk_hw_register_fixed_factor(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -411,7 +411,7 @@ _clk_hw_register_fixed_factor(struct device_d *dev, } static struct clk_hw * -_clk_hw_register_divider_table(struct device_d *dev, +_clk_hw_register_divider_table(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -431,7 +431,7 @@ _clk_hw_register_divider_table(struct device_d *dev, } static struct clk_hw * -_clk_hw_register_mux(struct device_d *dev, +_clk_hw_register_mux(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -472,7 +472,7 @@ static const struct clk_ops mp1_gate_clk_ops = { .is_enabled = clk_gate_is_enabled, }; -static struct clk_hw *_get_stm32_mux(struct device_d *dev, void __iomem *base, +static struct clk_hw *_get_stm32_mux(struct device *dev, void __iomem *base, const struct stm32_mux_cfg *cfg, spinlock_t *lock) { @@ -512,7 +512,7 @@ static struct clk_hw *_get_stm32_mux(struct device_d *dev, void __iomem *base, return mux_hw; } -static struct clk_hw *_get_stm32_div(struct device_d *dev, void __iomem *base, +static struct clk_hw *_get_stm32_div(struct device *dev, void __iomem *base, const struct stm32_div_cfg *cfg, spinlock_t *lock) { @@ -533,7 +533,7 @@ static struct clk_hw *_get_stm32_div(struct device_d *dev, void __iomem *base, return &div->hw; } -static struct clk_hw *_get_stm32_gate(struct device_d *dev, void __iomem *base, +static struct clk_hw *_get_stm32_gate(struct device *dev, void __iomem *base, const struct stm32_gate_cfg *cfg, spinlock_t *lock) { @@ -573,7 +573,7 @@ static struct clk_hw *_get_stm32_gate(struct device_d *dev, void __iomem *base, } static struct clk_hw * -clk_stm32_register_gate_ops(struct device_d *dev, +clk_stm32_register_gate_ops(struct device *dev, const char *name, const char *parent_name, unsigned long flags, @@ -609,7 +609,7 @@ clk_stm32_register_gate_ops(struct device_d *dev, } static struct clk_hw * -clk_stm32_register_composite(struct device_d *dev, +clk_stm32_register_composite(struct device *dev, const char *name, const char * const *parent_names, int num_parents, void __iomem *base, const struct stm32_composite_cfg *cfg, @@ -852,7 +852,7 @@ static const struct clk_ops pll_ops = { .get_parent = pll_get_parent, }; -static struct clk_hw *clk_register_pll(struct device_d *dev, const char *name, +static struct clk_hw *clk_register_pll(struct device *dev, const char *name, const char * const *parent_names, int num_parents, void __iomem *reg, @@ -989,7 +989,7 @@ static const struct clk_ops timer_ker_ops = { }; -static struct clk_hw *clk_register_cktim(struct device_d *dev, const char *name, +static struct clk_hw *clk_register_cktim(struct device *dev, const char *name, const char *parent_name, unsigned long flags, void __iomem *apbdiv, @@ -1030,7 +1030,7 @@ struct stm32_pll_cfg { u32 muxoff; }; -static struct clk_hw *_clk_register_pll(struct device_d *dev, +static struct clk_hw *_clk_register_pll(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -1049,7 +1049,7 @@ struct stm32_cktim_cfg { u32 offset_timpre; }; -static struct clk_hw *_clk_register_cktim(struct device_d *dev, +static struct clk_hw *_clk_register_cktim(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -1062,7 +1062,7 @@ static struct clk_hw *_clk_register_cktim(struct device_d *dev, } static struct clk_hw * -_clk_stm32_register_gate(struct device_d *dev, +_clk_stm32_register_gate(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -1077,7 +1077,7 @@ _clk_stm32_register_gate(struct device_d *dev, } static struct clk_hw * -_clk_stm32_register_composite(struct device_d *dev, +_clk_stm32_register_composite(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -2068,7 +2068,7 @@ static const struct of_device_id stm32mp1_match_data[] = { { } }; -static int stm32_register_hw_clk(struct device_d *dev, +static int stm32_register_hw_clk(struct device *dev, struct clk_hw_onecell_data *clk_data, void __iomem *base, spinlock_t *lock, const struct clock_config *cfg) @@ -2178,7 +2178,7 @@ static const struct reset_control_ops stm32_reset_ops = { .status = stm32_reset_status, }; -static int stm32_rcc_reset_init(struct device_d *dev, void __iomem *base, +static int stm32_rcc_reset_init(struct device *dev, void __iomem *base, const struct of_device_id *match) { const struct stm32_rcc_match_data *data = match->data; @@ -2197,7 +2197,7 @@ static int stm32_rcc_reset_init(struct device_d *dev, void __iomem *base, return reset_controller_register(&reset_data->rcdev); } -static int stm32_rcc_clock_init(struct device_d *dev, void __iomem *base, +static int stm32_rcc_clock_init(struct device *dev, void __iomem *base, const struct of_device_id *match) { const struct stm32_rcc_match_data *data = match->data; @@ -2236,7 +2236,7 @@ static int stm32_rcc_clock_init(struct device_d *dev, void __iomem *base, return of_clk_add_hw_provider(dev_of_node(dev), of_clk_hw_onecell_get, clk_data); } -static int stm32_rcc_init(struct device_d *dev, void __iomem *base, +static int stm32_rcc_init(struct device *dev, void __iomem *base, const struct of_device_id *match_data) { const struct of_device_id *match; @@ -2265,7 +2265,7 @@ static int stm32_rcc_init(struct device_d *dev, void __iomem *base, return 0; } -static int stm32mp1_rcc_init(struct device_d *dev) +static int stm32mp1_rcc_init(struct device *dev) { void __iomem *base; int ret; @@ -2284,7 +2284,7 @@ static int stm32mp1_rcc_init(struct device_d *dev) return 0; } -static int get_clock_deps(struct device_d *dev) +static int get_clock_deps(struct device *dev) { static const char * const clock_deps_name[] = { "hsi", "hse", "csi", "lsi", "lse", @@ -2314,7 +2314,7 @@ static int get_clock_deps(struct device_d *dev) return 0; } -static int stm32mp1_rcc_clocks_probe(struct device_d *dev) +static int stm32mp1_rcc_clocks_probe(struct device *dev) { int ret = get_clock_deps(dev); @@ -2324,7 +2324,7 @@ static int stm32mp1_rcc_clocks_probe(struct device_d *dev) return ret; } -static void stm32mp1_rcc_clocks_remove(struct device_d *dev) +static void stm32mp1_rcc_clocks_remove(struct device *dev) { struct device_node *child, *np = dev_of_node(dev); diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 52e309e877..30fe43032b 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -416,7 +416,7 @@ out: return ret; } -struct clk *clk_register(struct device_d *dev, struct clk_hw *hw) +struct clk *clk_register(struct device *dev, struct clk_hw *hw) { struct clk *clk; const struct clk_init_data *init = hw->init; diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index d7d0103bdc..c5f2135f54 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -129,7 +129,7 @@ static struct clk *clk_find(const char *dev_id, const char *con_id) return clk; } -static struct clk *clk_find_physbase(struct device_d *dev, const char *con_id) +static struct clk *clk_find_physbase(struct device *dev, const char *con_id) { struct clk_lookup *p; unsigned long start; @@ -167,7 +167,7 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id) } EXPORT_SYMBOL(clk_get_sys); -struct clk *clk_get(struct device_d *dev, const char *con_id) +struct clk *clk_get(struct device *dev, const char *con_id) { const char *dev_id = dev ? dev_name(dev) : NULL; struct clk *clk; @@ -265,7 +265,7 @@ int clk_register_clkdev(struct clk *clk, const char *con_id, } int clk_add_alias(const char *alias, const char *alias_dev_name, char *id, - struct device_d *dev) + struct device *dev) { struct clk *r = clk_get(dev, id); struct clk_lookup *l; diff --git a/drivers/clk/imx/clk-imx1.c b/drivers/clk/imx/clk-imx1.c index cff32c0f99..c38111cd3c 100644 --- a/drivers/clk/imx/clk-imx1.c +++ b/drivers/clk/imx/clk-imx1.c @@ -73,7 +73,7 @@ static int __init mx1_clocks_init(void __iomem *regs, unsigned long fref) return 0; } -static int imx1_ccm_probe(struct device_d *dev) +static int imx1_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *regs; diff --git a/drivers/clk/imx/clk-imx21.c b/drivers/clk/imx/clk-imx21.c index 7abd82eeb1..7a9cbb1c6f 100644 --- a/drivers/clk/imx/clk-imx21.c +++ b/drivers/clk/imx/clk-imx21.c @@ -92,7 +92,7 @@ static const char *spll_sel_clks[] = { "ckih", }; -static int imx21_ccm_probe(struct device_d *dev) +static int imx21_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base; diff --git a/drivers/clk/imx/clk-imx25.c b/drivers/clk/imx/clk-imx25.c index 2bd0d6004b..9edf1ad925 100644 --- a/drivers/clk/imx/clk-imx25.c +++ b/drivers/clk/imx/clk-imx25.c @@ -70,7 +70,7 @@ static const char *per_sel_clks[] = { "upll", }; -static int imx25_ccm_probe(struct device_d *dev) +static int imx25_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base; diff --git a/drivers/clk/imx/clk-imx27.c b/drivers/clk/imx/clk-imx27.c index 54894d1032..78b2d60da3 100644 --- a/drivers/clk/imx/clk-imx27.c +++ b/drivers/clk/imx/clk-imx27.c @@ -155,7 +155,7 @@ static const char *clko_sel_clks[] = { NULL, }; -static int imx27_ccm_probe(struct device_d *dev) +static int imx27_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base; diff --git a/drivers/clk/imx/clk-imx31.c b/drivers/clk/imx/clk-imx31.c index fe241cba5f..b0ea02580d 100644 --- a/drivers/clk/imx/clk-imx31.c +++ b/drivers/clk/imx/clk-imx31.c @@ -79,7 +79,7 @@ static const char *per_sel[] = { "ipg", }; -static int imx31_ccm_probe(struct device_d *dev) +static int imx31_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base; diff --git a/drivers/clk/imx/clk-imx35.c b/drivers/clk/imx/clk-imx35.c index 9af149f68e..eb83748582 100644 --- a/drivers/clk/imx/clk-imx35.c +++ b/drivers/clk/imx/clk-imx35.c @@ -85,7 +85,7 @@ static const char *ipg_per_sel[] = { "arm_per_div", }; -static int imx35_ccm_probe(struct device_d *dev) +static int imx35_ccm_probe(struct device *dev) { struct resource *iores; u32 pdr0, consumer_sel, hsp_sel; diff --git a/drivers/clk/imx/clk-imx5.c b/drivers/clk/imx/clk-imx5.c index d96aa81358..2c7dca01ef 100644 --- a/drivers/clk/imx/clk-imx5.c +++ b/drivers/clk/imx/clk-imx5.c @@ -194,7 +194,8 @@ static const char *ipu_sel[] = { "ahb", }; -static void __init mx5_clocks_common_init(struct device_d *dev, void __iomem *base) +static void __init mx5_clocks_common_init(struct device *dev, + void __iomem *base) { writel(0xffffffff, base + CCM_CCGR0); writel(0xffffffff, base + CCM_CCGR1); @@ -279,7 +280,7 @@ static void mx5_clocks_ipu_init(void __iomem *regs) clks[IMX5_CLK_IPU_SEL] = imx_clk_mux("ipu_sel", regs + CCM_CBCMR, 6, 2, ipu_sel, ARRAY_SIZE(ipu_sel)); } -static int __init mx50_clocks_init(struct device_d *dev, void __iomem *regs) +static int __init mx50_clocks_init(struct device *dev, void __iomem *regs) { clks[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", (void *)MX50_PLL1_BASE_ADDR); @@ -319,7 +320,7 @@ static int __init mx50_clocks_init(struct device_d *dev, void __iomem *regs) return 0; } -static int imx50_ccm_probe(struct device_d *dev) +static int imx50_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *regs; @@ -369,7 +370,7 @@ static void mx51_clocks_ipu_init(void __iomem *regs) clkdev_add_physbase(clks[IMX5_CLK_IPU_DI1_SEL], MX51_IPU_BASE_ADDR, "di1"); } -static int __init mx51_clocks_init(struct device_d *dev, void __iomem *regs) +static int __init mx51_clocks_init(struct device *dev, void __iomem *regs) { clks[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", (void *)MX51_PLL1_BASE_ADDR); clks[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", (void *)MX51_PLL2_BASE_ADDR); @@ -404,7 +405,7 @@ static int __init mx51_clocks_init(struct device_d *dev, void __iomem *regs) return 0; } -static int imx51_ccm_probe(struct device_d *dev) +static int imx51_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *regs; @@ -463,7 +464,7 @@ static void mx53_clocks_ipu_init(void __iomem *regs) clkdev_add_physbase(clks[IMX5_CLK_IPU_DI1_SEL], MX53_IPU_BASE_ADDR, "di1"); } -static int __init mx53_clocks_init(struct device_d *dev, void __iomem *regs) +static int __init mx53_clocks_init(struct device *dev, void __iomem *regs) { clks[IMX5_CLK_PLL1_SW] = imx_clk_pllv2("pll1_sw", "osc", (void *)MX53_PLL1_BASE_ADDR); clks[IMX5_CLK_PLL2_SW] = imx_clk_pllv2("pll2_sw", "osc", (void *)MX53_PLL2_BASE_ADDR); @@ -502,7 +503,7 @@ static int __init mx53_clocks_init(struct device_d *dev, void __iomem *regs) return 0; } -static int imx53_ccm_probe(struct device_d *dev) +static int imx53_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *regs; diff --git a/drivers/clk/imx/clk-imx6.c b/drivers/clk/imx/clk-imx6.c index 692bbd4e0a..bf444d7cfc 100644 --- a/drivers/clk/imx/clk-imx6.c +++ b/drivers/clk/imx/clk-imx6.c @@ -647,7 +647,7 @@ static void imx6_add_video_clks(void __iomem *anab, void __iomem *cb, struct dev clk_set_parent(clks[IMX6QDL_CLK_IPU2_DI1_PRE_SEL], clks[IMX6QDL_CLK_PLL5_VIDEO_DIV]); } -static int imx6_ccm_probe(struct device_d *dev) +static int imx6_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base, *anatop_base, *ccm_base; diff --git a/drivers/clk/imx/clk-imx6sl.c b/drivers/clk/imx/clk-imx6sl.c index 3e6a8c58d0..4c0e4856bd 100644 --- a/drivers/clk/imx/clk-imx6sl.c +++ b/drivers/clk/imx/clk-imx6sl.c @@ -81,7 +81,7 @@ static struct clk_div_table video_div_table[] = { { } }; -static int imx6sl_ccm_probe(struct device_d *dev) +static int imx6sl_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base, *anatop_base, *ccm_base; diff --git a/drivers/clk/imx/clk-imx6sx.c b/drivers/clk/imx/clk-imx6sx.c index ae61c138fd..8877bbef83 100644 --- a/drivers/clk/imx/clk-imx6sx.c +++ b/drivers/clk/imx/clk-imx6sx.c @@ -109,7 +109,7 @@ static struct clk_div_table video_div_table[] = { { } }; -static int imx6sx_ccm_probe(struct device_d *dev) +static int imx6sx_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base, *anatop_base, *ccm_base; diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c index 24350d63fa..523aa02529 100644 --- a/drivers/clk/imx/clk-imx6ul.c +++ b/drivers/clk/imx/clk-imx6ul.c @@ -92,7 +92,7 @@ static struct clk_div_table clk_enet_ref_table[] = { { } }; -static int imx6_ccm_probe(struct device_d *dev) +static int imx6_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base, *anatop_base, *ccm_base; diff --git a/drivers/clk/imx/clk-imx7.c b/drivers/clk/imx/clk-imx7.c index b75928d59e..38d3ca7efc 100644 --- a/drivers/clk/imx/clk-imx7.c +++ b/drivers/clk/imx/clk-imx7.c @@ -363,7 +363,7 @@ static struct device_node *ccm_np; static int imx7_clk_setup(void); -static int imx7_ccm_probe(struct device_d *dev) +static int imx7_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *base, *anatop_base, *ccm_base; diff --git a/drivers/clk/loongson/clk-ls1b200.c b/drivers/clk/loongson/clk-ls1b200.c index 096768c7a1..ada6e73a40 100644 --- a/drivers/clk/loongson/clk-ls1b200.c +++ b/drivers/clk/loongson/clk-ls1b200.c @@ -114,7 +114,7 @@ static void ls1b200_pll_init(void __iomem *base) 10, 1, dc_mux, ARRAY_SIZE(dc_mux), 0); } -static int ls1b200_clk_probe(struct device_d *dev) +static int ls1b200_clk_probe(struct device *dev) { struct resource *iores; void __iomem *base; diff --git a/drivers/clk/mvebu/common.c b/drivers/clk/mvebu/common.c index 17cbc77690..c0a74a9655 100644 --- a/drivers/clk/mvebu/common.c +++ b/drivers/clk/mvebu/common.c @@ -39,7 +39,7 @@ static struct of_device_id mvebu_coreclk_ids[] = { { } }; -static int mvebu_coreclk_probe(struct device_d *dev) +static int mvebu_coreclk_probe(struct device *dev) { struct resource *iores; struct device_node *np = dev->of_node; @@ -148,7 +148,7 @@ static struct of_device_id mvebu_clk_gating_ids[] = { { } }; -static int mvebu_clk_gating_probe(struct device_d *dev) +static int mvebu_clk_gating_probe(struct device *dev) { struct resource *iores; struct device_node *np = dev->of_node; diff --git a/drivers/clk/mvebu/corediv.c b/drivers/clk/mvebu/corediv.c index 7b85bd01d3..194fce700d 100644 --- a/drivers/clk/mvebu/corediv.c +++ b/drivers/clk/mvebu/corediv.c @@ -194,7 +194,7 @@ static struct of_device_id mvebu_corediv_clk_ids[] = { { } }; -static int mvebu_corediv_clk_probe(struct device_d *dev) +static int mvebu_corediv_clk_probe(struct device *dev) { struct resource *iores; struct device_node *np = dev->of_node; diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c index a211b64f2c..8181238b71 100644 --- a/drivers/clk/mxs/clk-imx23.c +++ b/drivers/clk/mxs/clk-imx23.c @@ -112,7 +112,7 @@ static int __init mx23_clocks_init(void __iomem *regs) return 0; } -static int imx23_ccm_probe(struct device_d *dev) +static int imx23_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *regs; diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index a10571237f..cb76258b26 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c @@ -67,7 +67,7 @@ enum imx28_clk { static struct clk *clks[clk_max]; static struct clk_onecell_data clk_data; -static int __init mx28_clocks_init(struct device_d *dev, void __iomem *regs) +static int __init mx28_clocks_init(struct device *dev, void __iomem *regs) { struct device_node *dcnp; @@ -175,7 +175,7 @@ static int __init mx28_clocks_init(struct device_d *dev, void __iomem *regs) return 0; } -static int imx28_ccm_probe(struct device_d *dev) +static int imx28_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *regs; diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c index 1f2430e521..4f7722220d 100644 --- a/drivers/clk/rockchip/clk-rk3399.c +++ b/drivers/clk/rockchip/clk-rk3399.c @@ -1627,7 +1627,7 @@ static const struct of_device_id clk_rk3399_match_table[] = { { } }; -static int __init clk_rk3399_probe(struct device_d *dev) +static int __init clk_rk3399_probe(struct device *dev) { struct device_node *np = dev->of_node; const struct of_device_id *match; diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c index 3e788f2c5a..632298a023 100644 --- a/drivers/clk/rockchip/clk-rk3568.c +++ b/drivers/clk/rockchip/clk-rk3568.c @@ -1719,7 +1719,7 @@ static const struct of_device_id clk_rk3568_match_table[] = { { } }; -static int __init clk_rk3568_probe(struct device_d *dev) +static int __init clk_rk3568_probe(struct device *dev) { struct device_node *np = dev->of_node; const struct clk_rk3568_inits *init_data; diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c index 010ccb92af..eb4d963eff 100644 --- a/drivers/clk/sifive/sifive-prci.c +++ b/drivers/clk/sifive/sifive-prci.c @@ -470,7 +470,7 @@ void sifive_prci_hfpclkpllsel_use_hfpclkpll(struct __prci_data *pd) * * Return: 0 upon success or a negative error code upon failure. */ -static int __prci_register_clocks(struct device_d *dev, struct __prci_data *pd, +static int __prci_register_clocks(struct device *dev, struct __prci_data *pd, const struct prci_clk_desc *desc) { struct clk_init_data init = { }; @@ -536,7 +536,7 @@ static int __prci_register_clocks(struct device_d *dev, struct __prci_data *pd, * * Return: 0 upon success or a negative error code upon failure. */ -static int sifive_prci_probe(struct device_d *dev) +static int sifive_prci_probe(struct device *dev) { struct resource *res; struct __prci_data *pd; diff --git a/drivers/clk/socfpga/clk.c b/drivers/clk/socfpga/clk.c index 6691403843..a1ed9c92d1 100644 --- a/drivers/clk/socfpga/clk.c +++ b/drivers/clk/socfpga/clk.c @@ -367,7 +367,8 @@ static struct clk *socfpga_gate_clk(struct device_node *node) return &cs->hw.clk; } -static void socfpga_register_clocks(struct device_d *dev, struct device_node *node) +static void socfpga_register_clocks(struct device *dev, + struct device_node *node) { struct device_node *child; struct clk *clk; @@ -394,7 +395,7 @@ static void socfpga_register_clocks(struct device_d *dev, struct device_node *no of_clk_add_provider(node, of_clk_src_simple_get, clk); } -static int socfpga_ccm_probe(struct device_d *dev) +static int socfpga_ccm_probe(struct device *dev) { struct resource *iores; void __iomem *regs; diff --git a/drivers/clk/starfive/jh7100-clkgen.c b/drivers/clk/starfive/jh7100-clkgen.c index 29095aa991..0d165c99a6 100644 --- a/drivers/clk/starfive/jh7100-clkgen.c +++ b/drivers/clk/starfive/jh7100-clkgen.c @@ -332,7 +332,7 @@ static void starfive_clkgen_init(struct device_node *np, void __iomem *base) static struct clk_onecell_data clk_data; -static int starfive_clkgen_clk_probe(struct device_d *dev) +static int starfive_clkgen_clk_probe(struct device *dev) { struct resource *iores; diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c index c7644361f3..1a16d95d9b 100644 --- a/drivers/clk/tegra/clk-tegra124.c +++ b/drivers/clk/tegra/clk-tegra124.c @@ -322,7 +322,7 @@ static struct tegra_clk_init_table init_table[] = { {TEGRA124_CLK_CLK_MAX, TEGRA124_CLK_CLK_MAX, 0, 0}, /* sentinel */ }; -static int tegra124_car_probe(struct device_d *dev) +static int tegra124_car_probe(struct device *dev) { struct resource *iores; iores = dev_request_mem_resource(dev, 0); diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c index 04bcec1f25..ae0434b87f 100644 --- a/drivers/clk/tegra/clk-tegra20.c +++ b/drivers/clk/tegra/clk-tegra20.c @@ -325,7 +325,7 @@ static struct tegra_clk_init_table init_table[] = { {TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0}, /* sentinel */ }; -static int tegra20_car_probe(struct device_d *dev) +static int tegra20_car_probe(struct device *dev) { struct resource *iores; iores = dev_request_mem_resource(dev, 0); diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c index cbb3b959b4..078dec958d 100644 --- a/drivers/clk/tegra/clk-tegra30.c +++ b/drivers/clk/tegra/clk-tegra30.c @@ -353,7 +353,7 @@ static struct tegra_clk_init_table init_table[] = { {TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0}, /* sentinel */ }; -static int tegra30_car_probe(struct device_d *dev) +static int tegra30_car_probe(struct device *dev) { struct resource *iores; iores = dev_request_mem_resource(dev, 0); diff --git a/drivers/clk/zynq/clkc.c b/drivers/clk/zynq/clkc.c index a6916bf448..6a75ade5ac 100644 --- a/drivers/clk/zynq/clkc.c +++ b/drivers/clk/zynq/clkc.c @@ -364,7 +364,7 @@ static struct clk *zynq_cpu_subclk(const char *name, return &subclk->hw.clk; } -static int zynq_clock_probe(struct device_d *dev) +static int zynq_clock_probe(struct device *dev) { struct resource *iores; void __iomem *clk_base; diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c index a5cb99ba8d..acbbc481a0 100644 --- a/drivers/clk/zynqmp/clkc.c +++ b/drivers/clk/zynqmp/clkc.c @@ -446,7 +446,7 @@ static struct clk *zynqmp_register_clk_topology(char *clk_name, return clk; } -static int zynqmp_register_clocks(struct device_d *dev, +static int zynqmp_register_clocks(struct device *dev, struct clk **clks, size_t num_clocks) { unsigned int i; @@ -518,7 +518,7 @@ static void zynqmp_fill_clock_info(struct zynqmp_clock_info *clock_info, } } -static int zynqmp_clock_probe(struct device_d *dev) +static int zynqmp_clock_probe(struct device *dev) { int err; u32 api_version; |