* [PATCH -next] misc: pvpanic: Use devm_platform_ioremap_resource()
@ 2020-09-18 8:36 Wang ShaoBo
2020-09-18 8:51 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Wang ShaoBo @ 2020-09-18 8:36 UTC (permalink / raw)
Cc: cj.chengjian, huawei.libin, gregkh, arnd, linux-kernel
Make use of devm_platform_ioremap_resource() provided by driver
core platform instead of duplicated analogue.
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
---
drivers/misc/pvpanic.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c
index a6e1a8983e1f..e16a5e51006e 100644
--- a/drivers/misc/pvpanic.c
+++ b/drivers/misc/pvpanic.c
@@ -143,13 +143,7 @@ static void pvpanic_unregister_acpi_driver(void) {}
static int pvpanic_mmio_probe(struct platform_device *pdev)
{
- struct resource *mem;
-
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!mem)
- return -EINVAL;
-
- base = devm_ioremap_resource(&pdev->dev, mem);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] misc: pvpanic: Use devm_platform_ioremap_resource()
2020-09-18 8:36 [PATCH -next] misc: pvpanic: Use devm_platform_ioremap_resource() Wang ShaoBo
@ 2020-09-18 8:51 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2020-09-18 8:51 UTC (permalink / raw)
To: Wang ShaoBo; +Cc: cj.chengjian, Libin, gregkh, linux-kernel
On Fri, Sep 18, 2020 at 10:37 AM Wang ShaoBo <bobo.shaobowang@huawei.com> wrote:
>
> Make use of devm_platform_ioremap_resource() provided by driver
> core platform instead of duplicated analogue.
>
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
Acked-by: Arnd Bergmann <arn@arndb.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-18 8:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 8:36 [PATCH -next] misc: pvpanic: Use devm_platform_ioremap_resource() Wang ShaoBo
2020-09-18 8:51 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.