[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201028162727.GX4077@smile.fi.intel.com>
Date: Wed, 28 Oct 2020 18:27:27 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Peng Hao <peng.hao2@....com.cn>
Subject: Re: [PATCH v1 4/5] misc: pvpanic: Combine ACPI and platform drivers
On Wed, Oct 28, 2020 at 04:51:19PM +0100, Arnd Bergmann wrote:
> (resending from the kernel.org address because of bounces)
>
> On Tue, Oct 27, 2020 at 11:07 PM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > On Tue, Oct 27, 2020 at 6:58 PM Andy Shevchenko
> > <andriy.shevchenko@...ux.intel.com> wrote:
> >
> > > static int pvpanic_mmio_probe(struct platform_device *pdev)
> > > {
> > > - base = devm_platform_ioremap_resource(pdev, 0);
> > > + struct device *dev = &pdev->dev;
> > > + struct resource *res;
> > > +
> > > + res = platform_get_mem_or_io_resource(pdev, 0);
> > > + if (res && resource_type(res) == IORESOURCE_IO)
> > > + base = devm_ioport_map(dev, res->start, resource_size(res));
> > > + else
> > > + base = devm_ioremap_resource(dev, res);
> >
> > Maybe this could already be combined into a devm_platform_iomap_resource()
> > similar to pci_iomap()?
Why not as a next iteration, because I don't see right now many users of this.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists