usb: gadget: Remove redundant pci_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 20 Sep 2013 09:36:40 +0000 (15:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 00:23:28 +0000 (17:23 -0700)
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/amd5536udc.c
drivers/usb/gadget/goku_udc.c
drivers/usb/gadget/net2280.c
drivers/usb/gadget/pch_udc.c

index a9a4346c83aae221776a297eff8330aab6bb733c..54a1e2954cea9d53384085e04b91d65418fb575e 100644 (file)
@@ -3078,8 +3078,6 @@ static void udc_pci_remove(struct pci_dev *pdev)
        if (dev->active)
                pci_disable_device(pdev);
 
-       pci_set_drvdata(pdev, NULL);
-
        udc_remove(dev);
 }
 
index c64deb9e3d62368e073893448dfe9f8b7ec610cc..74bb8df828762b1c9a9799d8ced19760e56e6a22 100644 (file)
@@ -1701,7 +1701,6 @@ static void goku_remove(struct pci_dev *pdev)
        if (dev->enabled)
                pci_disable_device(pdev);
 
-       pci_set_drvdata(pdev, NULL);
        dev->regs = NULL;
 
        INFO(dev, "unbind\n");
index 0781bff70015da3e259106a829d50ad1a507e346..9fbc8fe5ecc069e22441a9aef37f5c2ab5b72045 100644 (file)
@@ -2680,7 +2680,6 @@ static void net2280_remove (struct pci_dev *pdev)
        if (dev->enabled)
                pci_disable_device (pdev);
        device_remove_file (&pdev->dev, &dev_attr_registers);
-       pci_set_drvdata (pdev, NULL);
 
        INFO (dev, "unbind\n");
 }
index 24174e1d15642be63c652340c80e81dc61d1bb15..32d5e923750b017a479d394e51ba09c991c8ef4d 100644 (file)
@@ -3080,7 +3080,6 @@ static void pch_udc_remove(struct pci_dev *pdev)
        if (dev->active)
                pci_disable_device(pdev);
        kfree(dev);
-       pci_set_drvdata(pdev, NULL);
 }
 
 #ifdef CONFIG_PM