Messages in this thread | | | Date | Wed, 27 May 2020 12:50:34 +0300 | From | Serge Semin <> | Subject | Re: [PATCH v3 11/12] i2c: designware: Move reg-space remapping into a dedicated function |
| |
On Wed, May 27, 2020 at 12:26:09PM +0300, Andy Shevchenko wrote: > On Wed, May 27, 2020 at 4:03 AM Serge Semin > <Sergey.Semin@baikalelectronics.ru> wrote: > > > > This is a preparation patch before adding a quirk with custom registers > > map creation required for the Baikal-T1 System I2C support. Since we've > > touched this code anyway let's replace > > platform_get_resource()-devm_ioremap_resource() tuple with ready-to-use > > helper devm_platform_get_and_ioremap_resource(). > > ... > > > +static int dw_i2c_plat_request_regs(struct dw_i2c_dev *dev) > > +{ > > + struct platform_device *pdev = to_platform_device(dev->dev); > > > + int ret = 0; > > Redundant. > > > + dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); > > What's the point of this API if you don't use resource parameter? > > > + if (IS_ERR(dev->base)) > > + ret = PTR_ERR(dev->base); > > + > > + return ret; > > return PTR_ERR_OR_ZERO(dev->base); > > > +} > > > - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > - dev->base = devm_ioremap_resource(&pdev->dev, mem); > > - if (IS_ERR(dev->base)) > > - return PTR_ERR(dev->base); > > Wolfram, did my last series make your tree? I think there was a patch > that touched this part...
Right. It is there. I'll rebase the series on top of the i2c/for-next branch.
-Serge
> > -- > With Best Regards, > Andy Shevchenko
| |