diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-09 23:05:35 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-10 11:00:59 +0200 |
commit | 039f8b21d153aea4b413636d66619d53b725fc86 (patch) | |
tree | 5fca70d3d1c122f4e90cdffc04d4064bdc27a8a6 /drivers | |
parent | f595f03bfdfc3ce4526a653174024250d7287a8d (diff) | |
download | linux-stable-039f8b21d153aea4b413636d66619d53b725fc86.tar.gz linux-stable-039f8b21d153aea4b413636d66619d53b725fc86.tar.bz2 linux-stable-039f8b21d153aea4b413636d66619d53b725fc86.zip |
staging: emxx_udc: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20191009150535.6412-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/emxx_udc/emxx_udc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 147481bf680c..9e0c19eb867c 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -3078,7 +3078,6 @@ static int nbu2ss_drv_probe(struct platform_device *pdev) { int status = -ENODEV; struct nbu2ss_udc *udc; - struct resource *r; int irq; void __iomem *mmio_base; @@ -3088,8 +3087,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev) platform_set_drvdata(pdev, udc); /* require I/O memory and IRQ to be provided as resources */ - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mmio_base = devm_ioremap_resource(&pdev->dev, r); + mmio_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mmio_base)) return PTR_ERR(mmio_base); |