[PATCH v4 07/26] usb: isp1760: Manage device driver data in common code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't duplicate *_set_drvdata calls in glue code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Reviewed-by: Felipe Balbi <balbi@xxxxxx>
---
 drivers/usb/host/isp1760-hcd.c | 2 ++
 drivers/usb/host/isp1760-if.c  | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index 7498727..19fbd69 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 b96c62f..64eaf5d 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -146,7 +146,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:
@@ -272,8 +271,6 @@ static int isp1760_plat_probe(struct platform_device *pdev)
 		goto cleanup;
 	}
 
-	platform_set_drvdata(pdev, hcd);
-
 	pr_info("ISP1760 USB device initialised\n");
 	return 0;
 
-- 
2.0.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux