misc: pvpanic: Use devm_platform_ioremap_resource()
Make use of devm_platform_ioremap_resource() provided by driver core platform instead of duplicated analogue. Acked-by: Arnd Bergmann <arn@arndb.de> Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com> Link: https://lore.kernel.org/r/20200918083634.33124-1-bobo.shaobowang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
9e07279310
Коммит
a2e7408cf8
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче