diff mbox series

[1/2] usb: chipidea: imx: Use devm_platform_ioremap_resource()

Message ID 20190605173738.5380-1-festevam@gmail.com (mailing list archive)
State Mainlined
Commit 8fbd06e592304a121c61b0a01f0b85e7b5a9a05d
Headers show
Series [1/2] usb: chipidea: imx: Use devm_platform_ioremap_resource() | expand

Commit Message

Fabio Estevam June 5, 2019, 5:37 p.m. UTC
Use devm_platform_ioremap_resource() to simplify the code a bit.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/usb/chipidea/usbmisc_imx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index d8b67e150b12..b0b3ba65c8d7 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -769,7 +769,6 @@  MODULE_DEVICE_TABLE(of, usbmisc_imx_dt_ids);
 
 static int usbmisc_imx_probe(struct platform_device *pdev)
 {
-	struct resource	*res;
 	struct imx_usbmisc *data;
 	const struct of_device_id *of_id;
 
@@ -783,8 +782,7 @@  static int usbmisc_imx_probe(struct platform_device *pdev)
 
 	spin_lock_init(&data->lock);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	data->base = devm_ioremap_resource(&pdev->dev, res);
+	data->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(data->base))
 		return PTR_ERR(data->base);