|
@@ -119,7 +119,6 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci,
|
|
|
struct platform_device *dwc3;
|
|
|
struct dwc3_pci *glue;
|
|
|
int ret = -ENOMEM;
|
|
|
- int devid;
|
|
|
struct device *dev = &pci->dev;
|
|
|
|
|
|
glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
|
|
@@ -145,13 +144,7 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci,
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
- devid = dwc3_get_device_id();
|
|
|
- if (devid < 0) {
|
|
|
- ret = -ENOMEM;
|
|
|
- goto err1;
|
|
|
- }
|
|
|
-
|
|
|
- dwc3 = platform_device_alloc("dwc3", devid);
|
|
|
+ dwc3 = platform_device_alloc("dwc3", PLATFORM_DEVID_AUTO);
|
|
|
if (!dwc3) {
|
|
|
dev_err(dev, "couldn't allocate dwc3 device\n");
|
|
|
ret = -ENOMEM;
|
|
@@ -172,7 +165,7 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci,
|
|
|
ret = platform_device_add_resources(dwc3, res, ARRAY_SIZE(res));
|
|
|
if (ret) {
|
|
|
dev_err(dev, "couldn't add resources to dwc3 device\n");
|
|
|
- goto err2;
|
|
|
+ goto err1;
|
|
|
}
|
|
|
|
|
|
pci_set_drvdata(pci, glue);
|
|
@@ -195,10 +188,6 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci,
|
|
|
err3:
|
|
|
pci_set_drvdata(pci, NULL);
|
|
|
platform_device_put(dwc3);
|
|
|
-
|
|
|
-err2:
|
|
|
- dwc3_put_device_id(devid);
|
|
|
-
|
|
|
err1:
|
|
|
pci_disable_device(pci);
|
|
|
|
|
@@ -211,7 +200,6 @@ static void __devexit dwc3_pci_remove(struct pci_dev *pci)
|
|
|
|
|
|
platform_device_unregister(glue->usb2_phy);
|
|
|
platform_device_unregister(glue->usb3_phy);
|
|
|
- dwc3_put_device_id(glue->dwc3->id);
|
|
|
platform_device_unregister(glue->dwc3);
|
|
|
pci_set_drvdata(pci, NULL);
|
|
|
pci_disable_device(pci);
|