Commit e17d8766 authored by YueHaibing's avatar YueHaibing Committed by Felipe Balbi

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 195ad9c3
...@@ -2732,7 +2732,6 @@ static struct usb_role_switch_desc renesas_usb3_role_switch_desc = { ...@@ -2732,7 +2732,6 @@ static struct usb_role_switch_desc renesas_usb3_role_switch_desc = {
static int renesas_usb3_probe(struct platform_device *pdev) static int renesas_usb3_probe(struct platform_device *pdev)
{ {
struct renesas_usb3 *usb3; struct renesas_usb3 *usb3;
struct resource *res;
int irq, ret; int irq, ret;
const struct renesas_usb3_priv *priv; const struct renesas_usb3_priv *priv;
const struct soc_device_attribute *attr; const struct soc_device_attribute *attr;
...@@ -2751,8 +2750,7 @@ static int renesas_usb3_probe(struct platform_device *pdev) ...@@ -2751,8 +2750,7 @@ static int renesas_usb3_probe(struct platform_device *pdev)
if (!usb3) if (!usb3)
return -ENOMEM; return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); usb3->reg = devm_platform_ioremap_resource(pdev, 0);
usb3->reg = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(usb3->reg)) if (IS_ERR(usb3->reg))
return PTR_ERR(usb3->reg); return PTR_ERR(usb3->reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment