提交 1b6cb296 编写于 作者: L Laurent Navet 提交者: Greg Kroah-Hartman

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: NLaurent Navet <laurent.navet@gmail.com>
Reviewed-by: NMatthijs Kooijman <matthijs@stdin.nl>
Acked-by: NPaul Zimmerman <paulz@synopsys.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 25f73e62
...@@ -130,9 +130,9 @@ static int dwc2_driver_probe(struct pci_dev *dev, ...@@ -130,9 +130,9 @@ static int dwc2_driver_probe(struct pci_dev *dev,
pci_set_power_state(dev, PCI_D0); pci_set_power_state(dev, PCI_D0);
hsotg->dev = &dev->dev; hsotg->dev = &dev->dev;
hsotg->regs = devm_request_and_ioremap(&dev->dev, &dev->resource[0]); hsotg->regs = devm_ioremap_resource(&dev->dev, &dev->resource[0]);
if (!hsotg->regs) if (IS_ERR(hsotg->regs))
return -ENOMEM; return PTR_ERR(hsotg->regs);
dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n",
(unsigned long)pci_resource_start(dev, 0), hsotg->regs); (unsigned long)pci_resource_start(dev, 0), hsotg->regs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册