summaryrefslogtreecommitdiff
path: root/drivers/staging/dwc2
diff options
context:
space:
mode:
authorLaurent Navet <laurent.navet@gmail.com>2013-05-02 13:23:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-16 15:27:15 -0700
commit1b6cb29630ea1a10205d67901b94d4bfa2408f4c (patch)
treec4ae2ab94a003c6e6e0482442c1c660b2c3f3343 /drivers/staging/dwc2
parent25f73e62aa8308e212fe6c3f29ddc2aac699c08a (diff)
staging: dwc2: use devm_ioremap_resource()
Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource. Found with coccicheck and this semantic patch: scripts/coccinelle/api/devm_request_and_ioremap.cocci. Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Reviewed-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dwc2')
-rw-r--r--drivers/staging/dwc2/pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/dwc2/pci.c b/drivers/staging/dwc2/pci.c
index 8d16530fce30..0fcb9a5a87e1 100644
--- a/drivers/staging/dwc2/pci.c
+++ b/drivers/staging/dwc2/pci.c
@@ -130,9 +130,9 @@ static int dwc2_driver_probe(struct pci_dev *dev,
pci_set_power_state(dev, PCI_D0);
hsotg->dev = &dev->dev;
- hsotg->regs = devm_request_and_ioremap(&dev->dev, &dev->resource[0]);
- if (!hsotg->regs)
- return -ENOMEM;
+ hsotg->regs = devm_ioremap_resource(&dev->dev, &dev->resource[0]);
+ if (IS_ERR(hsotg->regs))
+ return PTR_ERR(hsotg->regs);
dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n",
(unsigned long)pci_resource_start(dev, 0), hsotg->regs);