Re: [PATCH 01/15] i2c: busses: emev2: Use devm_clk_get_enabled()

Andi Shyti
2023-06-12T07:56:34Z

Hi Geert,

> > --- a/drivers/i2c/busses/i2c-emev2.c
> > +++ b/drivers/i2c/busses/i2c-emev2.c
> > @@ -373,14 +373,10 @@ static int em_i2c_probe(struct platform_device *pdev)
> >
> > strscpy(priv->adap.name, "EMEV2 I2C", sizeof(priv->adap.name));
> >
> > - priv->sclk = devm_clk_get(&pdev->dev, "sclk");
> > + priv->sclk = devm_clk_get_enabled(&pdev->dev, "sclk");
> > if (IS_ERR(priv->sclk))
> > return PTR_ERR(priv->sclk);
>
> After this, priv->sclk is unused, so you can replace em_i2c_device.sclk
> by a local variable.

good point! Will send it again. Thanks!

Andi