diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-02 21:01:04 +0800 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-08-09 08:28:29 +0300 |
commit | 5b76f6a0b0f868d8f4fae4e79a92e433a250a2eb (patch) | |
tree | b9f741ecfa0943ea57bf2adf6cfa38037af85cce /drivers/usb/dwc3 | |
parent | 58dd0bad25543f95ffb5627d183eb4d01f38e633 (diff) | |
download | linux-5b76f6a0b0f868d8f4fae4e79a92e433a250a2eb.tar.gz linux-5b76f6a0b0f868d8f4fae4e79a92e433a250a2eb.tar.bz2 linux-5b76f6a0b0f868d8f4fae4e79a92e433a250a2eb.zip |
usb: dwc3: keystone: 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/dwc3')
-rw-r--r-- | drivers/usb/dwc3/dwc3-keystone.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/dwc3-keystone.c b/drivers/usb/dwc3/dwc3-keystone.c index cbee5fb9b9fb..d3c0233fed2f 100644 --- a/drivers/usb/dwc3/dwc3-keystone.c +++ b/drivers/usb/dwc3/dwc3-keystone.c @@ -81,7 +81,6 @@ static int kdwc3_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *node = pdev->dev.of_node; struct dwc3_keystone *kdwc; - struct resource *res; int error, irq; kdwc = devm_kzalloc(dev, sizeof(*kdwc), GFP_KERNEL); @@ -92,8 +91,7 @@ static int kdwc3_probe(struct platform_device *pdev) kdwc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - kdwc->usbss = devm_ioremap_resource(dev, res); + kdwc->usbss = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(kdwc->usbss)) return PTR_ERR(kdwc->usbss); |