]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pci/xen-pcifront.c
Merge tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / pci / xen-pcifront.c
index c18fab289ad56a57d974a5567bf03a4b4733dec8..d6cc62cb4cf7465fe22cb643fbde7a3f79f88a29 100644 (file)
@@ -189,7 +189,7 @@ static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn,
 
        if (verbose_request)
                dev_info(&pdev->xdev->dev,
-                        "read dev=%04x:%02x:%02x.%01x - offset %x size %d\n",
+                        "read dev=%04x:%02x:%02x.%d - offset %x size %d\n",
                         pci_domain_nr(bus), bus->number, PCI_SLOT(devfn),
                         PCI_FUNC(devfn), where, size);
 
@@ -228,7 +228,7 @@ static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn,
 
        if (verbose_request)
                dev_info(&pdev->xdev->dev,
-                        "write dev=%04x:%02x:%02x.%01x - "
+                        "write dev=%04x:%02x:%02x.%d - "
                         "offset %x size %d val %x\n",
                         pci_domain_nr(bus), bus->number,
                         PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val);
@@ -433,7 +433,7 @@ static int __devinit pcifront_scan_bus(struct pcifront_device *pdev,
                d = pci_scan_single_device(b, devfn);
                if (d)
                        dev_info(&pdev->xdev->dev, "New device on "
-                                "%04x:%02x:%02x.%02x found.\n", domain, bus,
+                                "%04x:%02x:%02x.%d found.\n", domain, bus,
                                 PCI_SLOT(devfn), PCI_FUNC(devfn));
        }
 
@@ -545,7 +545,7 @@ static void free_root_bus_devs(struct pci_bus *bus)
                dev = container_of(bus->devices.next, struct pci_dev,
                                   bus_list);
                dev_dbg(&dev->dev, "removing device\n");
-               pci_remove_bus_device(dev);
+               pci_stop_and_remove_bus_device(dev);
        }
 }
 
@@ -594,7 +594,7 @@ static pci_ers_result_t pcifront_common_process(int cmd,
        }
        pdrv = pcidev->driver;
 
-       if (get_driver(&pdrv->driver)) {
+       if (pdrv) {
                if (pdrv->err_handler && pdrv->err_handler->error_detected) {
                        dev_dbg(&pcidev->dev,
                                "trying to call AER service\n");
@@ -624,7 +624,6 @@ static pci_ers_result_t pcifront_common_process(int cmd,
                                }
                        }
                }
-               put_driver(&pdrv->driver);
        }
        if (!flag)
                result = PCI_ERS_RESULT_NONE;
@@ -1042,15 +1041,15 @@ static int pcifront_detach_devices(struct pcifront_device *pdev)
                pci_dev = pci_get_slot(pci_bus, PCI_DEVFN(slot, func));
                if (!pci_dev) {
                        dev_dbg(&pdev->xdev->dev,
-                               "Cannot get PCI device %04x:%02x:%02x.%02x\n",
+                               "Cannot get PCI device %04x:%02x:%02x.%d\n",
                                domain, bus, slot, func);
                        continue;
                }
-               pci_remove_bus_device(pci_dev);
+               pci_stop_and_remove_bus_device(pci_dev);
                pci_dev_put(pci_dev);
 
                dev_dbg(&pdev->xdev->dev,
-                       "PCI device %04x:%02x:%02x.%02x removed.\n",
+                       "PCI device %04x:%02x:%02x.%d removed.\n",
                        domain, bus, slot, func);
        }