usb: isp1760: Manage device driver data in common code
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 20 Jan 2015 22:55:46 +0000 (00:55 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 27 Jan 2015 15:38:28 +0000 (09:38 -0600)
Don't duplicate *_set_drvdata calls in glue code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/host/isp1760-hcd.c
drivers/usb/host/isp1760-if.c

index 74987276ac7368a8cbee0e1fda556a09db9f715e..19fbd6965630cac621657dda52c693b6e8725be2 100644 (file)
@@ -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:
index b96c62f40863c8f45ec48be89a41ab5b2dade360..64eaf5d0157ecfbe8503532dbde13c64e91987ab 100644 (file)
@@ -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;