diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-04 16:44:27 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 14:09:41 +0200 |
commit | f68341d194c35f4e8577d6f4ac90765f58e3f05f (patch) | |
tree | a00960b79722ed4b20aaa6899681dc2933386768 /drivers/usb/musb | |
parent | 89fa75acc40fd053115ce24d68c9a75be96af3e2 (diff) | |
download | linux-f68341d194c35f4e8577d6f4ac90765f58e3f05f.tar.bz2 |
USB: musb: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190904084427.18532-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index bd63450af76a..15cca912c53e 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2431,14 +2431,12 @@ static int musb_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; int irq = platform_get_irq_byname(pdev, "mc"); - struct resource *iomem; void __iomem *base; if (irq <= 0) return -ENODEV; - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, iomem); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); |