* [PATCH -next] usb: renesas_usbhs: use devm_platform_ioremap_resource() to simplify code
@ 2019-09-04 8:50 YueHaibing
0 siblings, 0 replies; only message in thread
From: YueHaibing @ 2019-09-04 8:50 UTC (permalink / raw)
To: gregkh, yoshihiro.shimoda.uh, horms+renesas, felipe.balbi,
chris.brandt, jarkko.nikula
Cc: linux-usb, linux-kernel, YueHaibing
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>
---
drivers/usb/renesas_usbhs/common.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 4c3de77..18d5d1a 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);
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-04 9:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 8:50 [PATCH -next] usb: renesas_usbhs: use devm_platform_ioremap_resource() to simplify code YueHaibing
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.