From 39b27e89a76f3827ad93aed9213a6daf2b91f819 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 25 May 2021 12:37:11 +0200 Subject: driver core: Drop helper devm_platform_ioremap_resource_wc() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the macro was introduced in 2019 (commit bb6243b4f73d ("drivers: platform: provide devm_platform_ioremap_resource_wc()") there is only a single user which hardly justifies the function for the small task it provides. So drop the helper and open-code it in the only user. Adapt the non-wc case accordingly. For a all-mod-config build on amd64 this change introduces the following changes according to bloat-o-meter: add/remove: 0/1 grow/shrink: 1/0 up/down: 20/-252 (-232) Function old new delta devm_platform_ioremap_resource_wc 252 - -252 sram_probe 796 816 +20 Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210525103711.956438-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman --- drivers/base/platform.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'drivers/base/platform.c') diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 9cd34def2237..ae071e8ed665 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -124,26 +124,6 @@ void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource); -/** - * devm_platform_ioremap_resource_wc - write-combined variant of - * devm_platform_ioremap_resource() - * - * @pdev: platform device to use both for memory resource lookup as well as - * resource management - * @index: resource index - * - * Return: a pointer to the remapped memory or an ERR_PTR() encoded error code - * on failure. - */ -void __iomem *devm_platform_ioremap_resource_wc(struct platform_device *pdev, - unsigned int index) -{ - struct resource *res; - - res = platform_get_resource(pdev, IORESOURCE_MEM, index); - return devm_ioremap_resource_wc(&pdev->dev, res); -} - /** * devm_platform_ioremap_resource_byname - call devm_ioremap_resource for * a platform device, retrieve the -- cgit v1.2.3