diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-04 11:50:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 15:09:40 +0300 |
commit | d706a95bb48a2c03c42ae15e28c1ca245f3362ab (patch) | |
tree | d13d52ed21d7100f0241ece0b6c74317fecbeab2 /drivers/usb/renesas_usbhs | |
parent | e719ffbf872ecf4d9b56314fb25ebe019895abe7 (diff) | |
download | linux-d706a95bb48a2c03c42ae15e28c1ca245f3362ab.tar.xz |
usb: renesas_usbhs: 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/20190904085045.24204-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r-- | drivers/usb/renesas_usbhs/common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 4c3de777ef6c..18d5d1a0593e 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -590,7 +590,7 @@ static int usbhs_probe(struct platform_device *pdev) { const struct renesas_usbhs_platform_info *info; struct usbhs_priv *priv; - struct resource *res, *irq_res; + struct resource *irq_res; struct device *dev = &pdev->dev; int ret, gpio; u32 tmp; @@ -619,8 +619,7 @@ static int usbhs_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); |