diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/sgi_hotplug.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index 78cf0711d1fa..ef07c36bccf7 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c | |||
@@ -249,19 +249,19 @@ static int sn_slot_enable(struct hotplug_slot *bss_hotplug_slot, | |||
249 | 249 | ||
250 | 250 | ||
251 | if (rc == PCI_SLOT_ALREADY_UP) { | 251 | if (rc == PCI_SLOT_ALREADY_UP) { |
252 | dev_dbg(slot->pci_bus->self, "is already active\n"); | 252 | dev_dbg(&slot->pci_bus->self->dev, "is already active\n"); |
253 | return 1; /* return 1 to user */ | 253 | return 1; /* return 1 to user */ |
254 | } | 254 | } |
255 | 255 | ||
256 | if (rc == PCI_L1_ERR) { | 256 | if (rc == PCI_L1_ERR) { |
257 | dev_dbg(slot->pci_bus->self, | 257 | dev_dbg(&slot->pci_bus->self->dev, |
258 | "L1 failure %d with message: %s", | 258 | "L1 failure %d with message: %s", |
259 | resp.resp_sub_errno, resp.resp_l1_msg); | 259 | resp.resp_sub_errno, resp.resp_l1_msg); |
260 | return -EPERM; | 260 | return -EPERM; |
261 | } | 261 | } |
262 | 262 | ||
263 | if (rc) { | 263 | if (rc) { |
264 | dev_dbg(slot->pci_bus->self, | 264 | dev_dbg(&slot->pci_bus->self->dev, |
265 | "insert failed with error %d sub-error %d\n", | 265 | "insert failed with error %d sub-error %d\n", |
266 | rc, resp.resp_sub_errno); | 266 | rc, resp.resp_sub_errno); |
267 | return -EIO; | 267 | return -EIO; |
@@ -287,25 +287,25 @@ static int sn_slot_disable(struct hotplug_slot *bss_hotplug_slot, | |||
287 | 287 | ||
288 | if ((action == PCI_REQ_SLOT_ELIGIBLE) && | 288 | if ((action == PCI_REQ_SLOT_ELIGIBLE) && |
289 | (rc == PCI_SLOT_ALREADY_DOWN)) { | 289 | (rc == PCI_SLOT_ALREADY_DOWN)) { |
290 | dev_dbg(slot->pci_bus->self, "Slot %s already inactive\n"); | 290 | dev_dbg(&slot->pci_bus->self->dev, "Slot %s already inactive\n", slot->physical_path); |
291 | return 1; /* return 1 to user */ | 291 | return 1; /* return 1 to user */ |
292 | } | 292 | } |
293 | 293 | ||
294 | if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_EMPTY_33MHZ)) { | 294 | if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_EMPTY_33MHZ)) { |
295 | dev_dbg(slot->pci_bus->self, | 295 | dev_dbg(&slot->pci_bus->self->dev, |
296 | "Cannot remove last 33MHz card\n"); | 296 | "Cannot remove last 33MHz card\n"); |
297 | return -EPERM; | 297 | return -EPERM; |
298 | } | 298 | } |
299 | 299 | ||
300 | if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_L1_ERR)) { | 300 | if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_L1_ERR)) { |
301 | dev_dbg(slot->pci_bus->self, | 301 | dev_dbg(&slot->pci_bus->self->dev, |
302 | "L1 failure %d with message \n%s\n", | 302 | "L1 failure %d with message \n%s\n", |
303 | resp.resp_sub_errno, resp.resp_l1_msg); | 303 | resp.resp_sub_errno, resp.resp_l1_msg); |
304 | return -EPERM; | 304 | return -EPERM; |
305 | } | 305 | } |
306 | 306 | ||
307 | if ((action == PCI_REQ_SLOT_ELIGIBLE) && rc) { | 307 | if ((action == PCI_REQ_SLOT_ELIGIBLE) && rc) { |
308 | dev_dbg(slot->pci_bus->self, | 308 | dev_dbg(&slot->pci_bus->self->dev, |
309 | "remove failed with error %d sub-error %d\n", | 309 | "remove failed with error %d sub-error %d\n", |
310 | rc, resp.resp_sub_errno); | 310 | rc, resp.resp_sub_errno); |
311 | return -EIO; | 311 | return -EIO; |
@@ -317,12 +317,12 @@ static int sn_slot_disable(struct hotplug_slot *bss_hotplug_slot, | |||
317 | if ((action == PCI_REQ_SLOT_DISABLE) && !rc) { | 317 | if ((action == PCI_REQ_SLOT_DISABLE) && !rc) { |
318 | pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); | 318 | pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); |
319 | pcibus_info->pbi_enabled_devices &= ~(1 << device_num); | 319 | pcibus_info->pbi_enabled_devices &= ~(1 << device_num); |
320 | dev_dbg(slot->pci_bus->self, "remove successful\n"); | 320 | dev_dbg(&slot->pci_bus->self->dev, "remove successful\n"); |
321 | return 0; | 321 | return 0; |
322 | } | 322 | } |
323 | 323 | ||
324 | if ((action == PCI_REQ_SLOT_DISABLE) && rc) { | 324 | if ((action == PCI_REQ_SLOT_DISABLE) && rc) { |
325 | dev_dbg(slot->pci_bus->self,"remove failed rc = %d\n", rc); | 325 | dev_dbg(&slot->pci_bus->self->dev,"remove failed rc = %d\n", rc); |
326 | } | 326 | } |
327 | 327 | ||
328 | return rc; | 328 | return rc; |
@@ -375,7 +375,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot) | |||
375 | num_funcs = pci_scan_slot(slot->pci_bus, | 375 | num_funcs = pci_scan_slot(slot->pci_bus, |
376 | PCI_DEVFN(slot->device_num + 1, 0)); | 376 | PCI_DEVFN(slot->device_num + 1, 0)); |
377 | if (!num_funcs) { | 377 | if (!num_funcs) { |
378 | dev_dbg(slot->pci_bus->self, "no device in slot\n"); | 378 | dev_dbg(&slot->pci_bus->self->dev, "no device in slot\n"); |
379 | mutex_unlock(&sn_hotplug_mutex); | 379 | mutex_unlock(&sn_hotplug_mutex); |
380 | return -ENODEV; | 380 | return -ENODEV; |
381 | } | 381 | } |
@@ -427,7 +427,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot) | |||
427 | phandle = PCI_CONTROLLER(slot->pci_bus)->acpi_handle; | 427 | phandle = PCI_CONTROLLER(slot->pci_bus)->acpi_handle; |
428 | 428 | ||
429 | if (acpi_bus_get_device(phandle, &pdevice)) { | 429 | if (acpi_bus_get_device(phandle, &pdevice)) { |
430 | dev_dbg(slot->pci_bus->self, | 430 | dev_dbg(&slot->pci_bus->self->dev, |
431 | "no parent device, assuming NULL\n"); | 431 | "no parent device, assuming NULL\n"); |
432 | pdevice = NULL; | 432 | pdevice = NULL; |
433 | } | 433 | } |
@@ -479,10 +479,10 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot) | |||
479 | mutex_unlock(&sn_hotplug_mutex); | 479 | mutex_unlock(&sn_hotplug_mutex); |
480 | 480 | ||
481 | if (rc == 0) | 481 | if (rc == 0) |
482 | dev_dbg(slot->pci_bus->self, | 482 | dev_dbg(&slot->pci_bus->self->dev, |
483 | "insert operation successful\n"); | 483 | "insert operation successful\n"); |
484 | else | 484 | else |
485 | dev_dbg(slot->pci_bus->self, | 485 | dev_dbg(&slot->pci_bus->self->dev, |
486 | "insert operation failed rc = %d\n", rc); | 486 | "insert operation failed rc = %d\n", rc); |
487 | 487 | ||
488 | return rc; | 488 | return rc; |
@@ -659,16 +659,16 @@ static int sn_hotplug_slot_register(struct pci_bus *pci_bus) | |||
659 | if (rc) | 659 | if (rc) |
660 | goto register_err; | 660 | goto register_err; |
661 | } | 661 | } |
662 | dev_dbg(pci_bus->self, "Registered bus with hotplug\n"); | 662 | dev_dbg(&pci_bus->self->dev, "Registered bus with hotplug\n"); |
663 | return rc; | 663 | return rc; |
664 | 664 | ||
665 | register_err: | 665 | register_err: |
666 | dev_dbg(pci_bus->self, "bus failed to register with err = %d\n", | 666 | dev_dbg(&pci_bus->self->dev, "bus failed to register with err = %d\n", |
667 | rc); | 667 | rc); |
668 | 668 | ||
669 | alloc_err: | 669 | alloc_err: |
670 | if (rc == -ENOMEM) | 670 | if (rc == -ENOMEM) |
671 | dev_dbg(pci_bus->self, "Memory allocation error\n"); | 671 | dev_dbg(&pci_bus->self->dev, "Memory allocation error\n"); |
672 | 672 | ||
673 | /* destroy THIS element */ | 673 | /* destroy THIS element */ |
674 | if (bss_hotplug_slot) | 674 | if (bss_hotplug_slot) |
@@ -701,10 +701,10 @@ static int sn_pci_hotplug_init(void) | |||
701 | 701 | ||
702 | rc = sn_pci_bus_valid(pci_bus); | 702 | rc = sn_pci_bus_valid(pci_bus); |
703 | if (rc != 1) { | 703 | if (rc != 1) { |
704 | dev_dbg(pci_bus->self, "not a valid hotplug bus\n"); | 704 | dev_dbg(&pci_bus->self->dev, "not a valid hotplug bus\n"); |
705 | continue; | 705 | continue; |
706 | } | 706 | } |
707 | dev_dbg(pci_bus->self, "valid hotplug bus\n"); | 707 | dev_dbg(&pci_bus->self->dev, "valid hotplug bus\n"); |
708 | 708 | ||
709 | rc = sn_hotplug_slot_register(pci_bus); | 709 | rc = sn_hotplug_slot_register(pci_bus); |
710 | if (!rc) { | 710 | if (!rc) { |