projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fd7a05
)
usb: gadget: pxa25x_udc: use devm_platform_ioremap_resource() to simplify code
author
YueHaibing
<yuehaibing@huawei.com>
Wed, 4 Sep 2019 09:42:22 +0000
(17:42 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 12:09:39 +0000
(14:09 +0200)
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/20190904094222.23128-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/pxa25x_udc.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/udc/pxa25x_udc.c
b/drivers/usb/gadget/udc/pxa25x_udc.c
index d4be53559f2e160ec9e37f49641e07c1ba45ff2e..cfafdd92c2a841d7c425b52a9bb8b8e921fcd5aa 100644
(file)
--- a/
drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/
drivers/usb/gadget/udc/pxa25x_udc.c
@@
-2321,7
+2321,6
@@
static int pxa25x_udc_probe(struct platform_device *pdev)
struct pxa25x_udc *dev = &memory;
int retval, irq;
u32 chiprev;
- struct resource *res;
pr_info("%s: version %s\n", driver_name, DRIVER_VERSION);
@@
-2367,8
+2366,7
@@
static int pxa25x_udc_probe(struct platform_device *pdev)
if (irq < 0)
return -ENODEV;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dev->regs = devm_ioremap_resource(&pdev->dev, res);
+ dev->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dev->regs))
return PTR_ERR(dev->regs);