diff options
Diffstat (limited to 'drivers/macintosh/macio_asic.c')
-rw-r--r-- | drivers/macintosh/macio_asic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 97147804a49..b6e7ddc09d7 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -492,8 +492,8 @@ static void macio_pci_add_devices(struct macio_chip *chip) | |||
492 | } | 492 | } |
493 | 493 | ||
494 | /* Add media bay devices if any */ | 494 | /* Add media bay devices if any */ |
495 | pnode = mbdev->ofdev.dev.of_node; | 495 | if (mbdev) { |
496 | if (mbdev) | 496 | pnode = mbdev->ofdev.dev.of_node; |
497 | for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { | 497 | for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { |
498 | if (macio_skip_device(np)) | 498 | if (macio_skip_device(np)) |
499 | continue; | 499 | continue; |
@@ -502,10 +502,11 @@ static void macio_pci_add_devices(struct macio_chip *chip) | |||
502 | mbdev, root_res) == NULL) | 502 | mbdev, root_res) == NULL) |
503 | of_node_put(np); | 503 | of_node_put(np); |
504 | } | 504 | } |
505 | } | ||
505 | 506 | ||
506 | /* Add serial ports if any */ | 507 | /* Add serial ports if any */ |
507 | pnode = sdev->ofdev.dev.of_node; | ||
508 | if (sdev) { | 508 | if (sdev) { |
509 | pnode = sdev->ofdev.dev.of_node; | ||
509 | for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { | 510 | for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { |
510 | if (macio_skip_device(np)) | 511 | if (macio_skip_device(np)) |
511 | continue; | 512 | continue; |
@@ -525,7 +526,6 @@ static void macio_pci_add_devices(struct macio_chip *chip) | |||
525 | int macio_register_driver(struct macio_driver *drv) | 526 | int macio_register_driver(struct macio_driver *drv) |
526 | { | 527 | { |
527 | /* initialize common driver fields */ | 528 | /* initialize common driver fields */ |
528 | drv->driver.name = drv->name; | ||
529 | drv->driver.bus = &macio_bus_type; | 529 | drv->driver.bus = &macio_bus_type; |
530 | 530 | ||
531 | /* register with core */ | 531 | /* register with core */ |