diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-04 17:48:36 +0800 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-10-22 10:29:56 +0300 |
commit | e17d87668ecddfd6f7ebbc784b4008e74d4e017c (patch) | |
tree | d4e09fdfacaa6f00ce2490fac1a477876529b73b /drivers/usb/gadget | |
parent | 195ad9c36d82527aed95ffaba35b8ce95ee5ff61 (diff) | |
download | linux-e17d87668ecddfd6f7ebbc784b4008e74d4e017c.tar.bz2 |
usb: gadget: renesas_usb3: 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>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/renesas_usb3.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index e098f16c01cb..922a19be1135 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -2732,7 +2732,6 @@ static struct usb_role_switch_desc renesas_usb3_role_switch_desc = { static int renesas_usb3_probe(struct platform_device *pdev) { struct renesas_usb3 *usb3; - struct resource *res; int irq, ret; const struct renesas_usb3_priv *priv; const struct soc_device_attribute *attr; @@ -2751,8 +2750,7 @@ static int renesas_usb3_probe(struct platform_device *pdev) if (!usb3) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - usb3->reg = devm_ioremap_resource(&pdev->dev, res); + usb3->reg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(usb3->reg)) return PTR_ERR(usb3->reg); |