projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3055c92
)
usb: gadget: s3c-hsudc: use devm_platform_ioremap_resource() to simplify code
author
YueHaibing
<yuehaibing@huawei.com>
Wed, 4 Sep 2019 09:50:22 +0000
(17:50 +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/20190904095022.24528-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/s3c-hsudc.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/udc/s3c-hsudc.c
b/drivers/usb/gadget/udc/s3c-hsudc.c
index 858993c73442243c2a005934eb91e21b0dc1ae9e..21252fbc0319de648bf423b157c5860db5707c30 100644
(file)
--- a/
drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/
drivers/usb/gadget/udc/s3c-hsudc.c
@@
-1263,7
+1263,6
@@
static const struct usb_gadget_ops s3c_hsudc_gadget_ops = {
static int s3c_hsudc_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *res;
struct s3c_hsudc *hsudc;
struct s3c24xx_hsudc_platdata *pd = dev_get_platdata(&pdev->dev);
int ret, i;
@@
-1290,9
+1289,7
@@
static int s3c_hsudc_probe(struct platform_device *pdev)
goto err_supplies;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- hsudc->regs = devm_ioremap_resource(&pdev->dev, res);
+ hsudc->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(hsudc->regs)) {
ret = PTR_ERR(hsudc->regs);
goto err_res;