On 30.08.2022 15:52, Conor Dooley wrote: > The register functions are now comprised of only a single operation > each and no longer add anything to the driver. Delete them. > > Reviewed-by: Daire McNamara <daire.mcnamara@xxxxxxxxxxxxx> > Signed-off-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx> Reviewed-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx> > --- > drivers/clk/microchip/clk-mpfs.c | 33 ++++++-------------------------- > 1 file changed, 6 insertions(+), 27 deletions(-) > > diff --git a/drivers/clk/microchip/clk-mpfs.c b/drivers/clk/microchip/clk-mpfs.c > index 60e1e82912fe..538cb589d232 100644 > --- a/drivers/clk/microchip/clk-mpfs.c > +++ b/drivers/clk/microchip/clk-mpfs.c > @@ -203,14 +203,6 @@ static struct mpfs_msspll_hw_clock mpfs_msspll_clks[] = { > MSSPLL_FBDIV_WIDTH, 0, REG_MSSPLL_SSCG_2_CR), > }; > > -static int mpfs_clk_register_msspll(struct device *dev, struct mpfs_msspll_hw_clock *msspll_hw, > - void __iomem *base) > -{ > - msspll_hw->base = base; > - > - return devm_clk_hw_register(dev, &msspll_hw->hw); > -} > - > static int mpfs_clk_register_mssplls(struct device *dev, struct mpfs_msspll_hw_clock *msspll_hws, > unsigned int num_clks, struct mpfs_clock_data *data) > { > @@ -220,7 +212,8 @@ static int mpfs_clk_register_mssplls(struct device *dev, struct mpfs_msspll_hw_c > for (i = 0; i < num_clks; i++) { > struct mpfs_msspll_hw_clock *msspll_hw = &msspll_hws[i]; > > - ret = mpfs_clk_register_msspll(dev, msspll_hw, data->msspll_base); > + msspll_hw->base = data->msspll_base; > + ret = devm_clk_hw_register(dev, &msspll_hw->hw); > if (ret) > return dev_err_probe(dev, ret, "failed to register msspll id: %d\n", > CLK_MSSPLL); > @@ -314,14 +307,6 @@ static struct mpfs_cfg_hw_clock mpfs_cfg_clks[] = { > } > }; > > -static int mpfs_clk_register_cfg(struct device *dev, struct mpfs_cfg_hw_clock *cfg_hw, > - void __iomem *base) > -{ > - cfg_hw->cfg.reg = base + cfg_hw->reg_offset; > - > - return devm_clk_hw_register(dev, &cfg_hw->hw); > -} > - > static int mpfs_clk_register_cfgs(struct device *dev, struct mpfs_cfg_hw_clock *cfg_hws, > unsigned int num_clks, struct mpfs_clock_data *data) > { > @@ -331,7 +316,8 @@ static int mpfs_clk_register_cfgs(struct device *dev, struct mpfs_cfg_hw_clock * > for (i = 0; i < num_clks; i++) { > struct mpfs_cfg_hw_clock *cfg_hw = &cfg_hws[i]; > > - ret = mpfs_clk_register_cfg(dev, cfg_hw, data->base); > + cfg_hw->cfg.reg = data->base + cfg_hw->reg_offset; > + ret = devm_clk_hw_register(dev, &cfg_hw->hw); > if (ret) > return dev_err_probe(dev, ret, "failed to register clock id: %d\n", > cfg_hw->id); > @@ -454,14 +440,6 @@ static struct mpfs_periph_hw_clock mpfs_periph_clks[] = { > CLK_PERIPH(CLK_CFM, "clk_periph_cfm", PARENT_CLK(AHB), 29, 0), > }; > > -static int mpfs_clk_register_periph(struct device *dev, struct mpfs_periph_hw_clock *periph_hw, > - void __iomem *base) > -{ > - periph_hw->periph.reg = base + REG_SUBBLK_CLOCK_CR; > - > - return devm_clk_hw_register(dev, &periph_hw->hw); > -} > - > static int mpfs_clk_register_periphs(struct device *dev, struct mpfs_periph_hw_clock *periph_hws, > int num_clks, struct mpfs_clock_data *data) > { > @@ -471,7 +449,8 @@ static int mpfs_clk_register_periphs(struct device *dev, struct mpfs_periph_hw_c > for (i = 0; i < num_clks; i++) { > struct mpfs_periph_hw_clock *periph_hw = &periph_hws[i]; > > - ret = mpfs_clk_register_periph(dev, periph_hw, data->base); > + periph_hw->periph.reg = data->base + REG_SUBBLK_CLOCK_CR; > + ret = devm_clk_hw_register(dev, &periph_hw->hw); > if (ret) > return dev_err_probe(dev, ret, "failed to register clock id: %d\n", > periph_hw->id);