From: Arnd Bergmann <arnd@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Peng Hao <peng.hao2@zte.com.cn>
Subject: Re: [PATCH v1 4/5] misc: pvpanic: Combine ACPI and platform drivers
Date: Wed, 28 Oct 2020 16:51:19 +0100 [thread overview]
Message-ID: <CAK8P3a2L2FWj2z6w_cgz41sg=AXJJ2gEC8Z+wC8FUY6Uq9TdDw@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a3XgTD2bFej0=WsD3a=uMur36_C71EiOvw3wb5A9QPAfQ@mail.gmail.com>
(resending from the kernel.org address because of bounces)
On Tue, Oct 27, 2020 at 11:07 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Oct 27, 2020 at 6:58 PM Andy Shevchenko
> <andriy.shevchenko@linux.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()?
>
> Arnd
next prev parent reply other threads:[~2020-10-28 21:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 17:58 [PATCH v1 1/5] driver core: platform: Introduce platform_get_mem_or_io_resource() Andy Shevchenko
2020-10-27 17:58 ` [PATCH v1 2/5] vfio: platform: Switch to use platform_get_mem_or_io_resource() Andy Shevchenko
2020-12-03 12:54 ` Auger Eric
2020-12-03 13:07 ` Andy Shevchenko
2020-12-09 14:47 ` Greg Kroah-Hartman
2020-12-09 16:48 ` Andy Shevchenko
2020-12-09 16:53 ` Greg Kroah-Hartman
2020-12-09 18:22 ` Andy Shevchenko
2020-12-03 13:22 ` Cornelia Huck
2020-12-03 18:05 ` Alex Williamson
2020-10-27 17:58 ` [PATCH v1 3/5] usb: host: sl811: " Andy Shevchenko
2020-10-27 17:58 ` [PATCH v1 4/5] misc: pvpanic: Combine ACPI and platform drivers Andy Shevchenko
[not found] ` <CAK8P3a3XgTD2bFej0=WsD3a=uMur36_C71EiOvw3wb5A9QPAfQ@mail.gmail.com>
2020-10-28 15:51 ` Arnd Bergmann [this message]
2020-10-28 16:27 ` Andy Shevchenko
2020-10-27 17:58 ` [PATCH v1 5/5] misc: pvpanic: Replace OF headers by mod_devicetable.h Andy Shevchenko
2020-12-03 13:21 ` [PATCH v1 1/5] driver core: platform: Introduce platform_get_mem_or_io_resource() Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK8P3a2L2FWj2z6w_cgz41sg=AXJJ2gEC8Z+wC8FUY6Uq9TdDw@mail.gmail.com' \
--to=arnd@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.hao2@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).