Don't duplicate *_set_drvdata calls in glue code.
Signed-off-by: Laurent Pinchart <[email protected]>
---
drivers/usb/host/isp1760-hcd.c | 2 ++
drivers/usb/host/isp1760-if.c | 4 ----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index 281de5e..7bf6517 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -2252,6 +2252,8 @@ struct usb_hcd *isp1760_register(phys_addr_t res_start,
resource_size_t res_len,
goto err_unmap;
device_wakeup_enable(hcd->self.controller);
+ dev_set_drvdata(dev, hcd);
+
return hcd;
err_unmap:
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 42e0884..025930f 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -106,7 +106,6 @@ static int of_isp1760_probe(struct platform_device *dev)
goto free_gpio;
}
- platform_set_drvdata(dev, hcd);
return ret;
free_gpio:
@@ -268,7 +267,6 @@ static int isp1761_pci_probe(struct pci_dev *dev,
iounmap(iobase);
release_mem_region(nxp_pci_io_base, iolength);
- pci_set_drvdata(dev, hcd);
return 0;
cleanup3:
@@ -366,8 +364,6 @@ static int isp1760_plat_probe(struct platform_device *pdev)
irqflags, -ENOENT,
&pdev->dev, dev_name(&pdev->dev), devflags);
- platform_set_drvdata(pdev, hcd);
-
if (IS_ERR(hcd)) {
pr_warning("isp1760: Failed to register the HCD device\n");
ret = -ENODEV;
--
2.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html