summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1362-hcd.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-09-04 11:05:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-04 14:09:40 +0200
commit9cbe0c60c7919d98c6ea51fd91a6ba8c7b09eed6 (patch)
tree20d620766109809c98a5adf0e12ea694d342d533 /drivers/usb/host/isp1362-hcd.c
parentusb: host: xhci-tegra: use devm_platform_ioremap_resource() to simplify code (diff)
downloadlinux-9cbe0c60c7919d98c6ea51fd91a6ba8c7b09eed6.tar.xz
linux-9cbe0c60c7919d98c6ea51fd91a6ba8c7b09eed6.zip
usb: isp1362-hcd: 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/20190904090549.24456-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/isp1362-hcd.c')
-rw-r--r--drivers/usb/host/isp1362-hcd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 96f8daa11f25..4a3a2852523f 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2627,7 +2627,7 @@ static int isp1362_probe(struct platform_device *pdev)
{
struct usb_hcd *hcd;
struct isp1362_hcd *isp1362_hcd;
- struct resource *addr, *data, *irq_res;
+ struct resource *data, *irq_res;
void __iomem *addr_reg;
void __iomem *data_reg;
int irq;
@@ -2651,8 +2651,7 @@ static int isp1362_probe(struct platform_device *pdev)
irq = irq_res->start;
- addr = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- addr_reg = devm_ioremap_resource(&pdev->dev, addr);
+ addr_reg = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(addr_reg))
return PTR_ERR(addr_reg);