Skip to content

Commit

Permalink
drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartosz Golaszewski authored and Linus Walleij committed Feb 22, 2019
1 parent 18fadd6 commit 837ccda
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,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)
{
Expand All @@ -96,6 +97,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
Expand Down

0 comments on commit 837ccda

Please sign in to comment.