diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-04 17:50:22 +0800 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-10-22 10:30:01 +0300 |
commit | 6a3893bfbe0266c5703ed8d1e0487ac841c50c18 (patch) | |
tree | 0db68823d0e02acf8f583d2c77dbffcd8362270a /drivers/usb/gadget | |
parent | e17d87668ecddfd6f7ebbc784b4008e74d4e017c (diff) | |
download | linux-6a3893bfbe0266c5703ed8d1e0487ac841c50c18.tar.gz linux-6a3893bfbe0266c5703ed8d1e0487ac841c50c18.tar.bz2 linux-6a3893bfbe0266c5703ed8d1e0487ac841c50c18.zip |
usb: gadget: s3c-hsudc: 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>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/s3c-hsudc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c index 858993c73442..21252fbc0319 100644 --- 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; |