From a790ebc1f0189bf80bdde03b427e7da7fd3c62f7 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 23 Jun 2014 11:43:08 +0530 Subject: [PATCH] staging: emxx_udc: Fix build error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit devm_request_and_ioremap has been removed since commit c9d53c0f2d23 ("devres: remove devm_request_and_ioremap()") Use devm_ioremap_resource instead. While at it, also remove redundant error message as it is now handled by devm_ioremap_resource. Without this patch we get the following build error: drivers/staging/emxx_udc/emxx_udc.c:3370:2: error: implicit declaration of function ‘devm_request_and_ioremap’ [-Werror=implicit-function-declaration] Signed-off-by: Sachin Kamat Signed-off-by: Greg Kroah-Hartman --- drivers/staging/emxx_udc/emxx_udc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index c92ded8b5b3e..ee0094d8cc6e 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -3367,11 +3368,9 @@ static int nbu2ss_drv_probe(struct platform_device *pdev) /* require I/O memory and IRQ to be provided as resources */ r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mmio_base = devm_request_and_ioremap(&pdev->dev, r); - if (IS_ERR(mmio_base)) { - dev_err(&pdev->dev, "failed to map I/O memory\n"); + mmio_base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(mmio_base)) return PTR_ERR(mmio_base); - } irq = platform_get_irq(pdev, 0); if (irq < 0) { -- 2.39.5