]> git.itanic.dy.fi Git - linux-stable/commitdiff
drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Thu, 21 Feb 2019 16:26:27 +0000 (17:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 11:42:15 +0000 (12:42 +0100)
commit 837ccda3480d2861c09aabc5fa014be18df9dd3c upstream.

We only build devm_ioremap_resource() if HAS_IOMEM is selected, so this
dependency must cascade down to devm_platform_ioremap_resource().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/platform.c

index ea83c279b8a360e787948c36fcf0d7b84f1063f2..2f89e618b142c32afad7c8369b3d28170fa20744 100644 (file)
@@ -88,6 +88,7 @@ EXPORT_SYMBOL_GPL(platform_get_resource);
  *        resource managemend
  * @index: resource index
  */
+#ifdef CONFIG_HAS_IOMEM
 void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev,
                                             unsigned int index)
 {
@@ -97,6 +98,7 @@ void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev,
        return devm_ioremap_resource(&pdev->dev, res);
 }
 EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource);
+#endif /* CONFIG_HAS_IOMEM */
 
 /**
  * platform_get_irq - get an IRQ for a device