diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/macio_asic.c | 8 | ||||
-rw-r--r-- | drivers/macintosh/mediabay.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/rack-meter.c | 8 |
3 files changed, 13 insertions, 9 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 */ |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 288acce76b7..2fd435bc542 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -728,8 +728,10 @@ static struct of_device_id media_bay_match[] = | |||
728 | 728 | ||
729 | static struct macio_driver media_bay_driver = | 729 | static struct macio_driver media_bay_driver = |
730 | { | 730 | { |
731 | .name = "media-bay", | 731 | .driver = { |
732 | .match_table = media_bay_match, | 732 | .name = "media-bay", |
733 | .of_match_table = media_bay_match, | ||
734 | }, | ||
733 | .probe = media_bay_attach, | 735 | .probe = media_bay_attach, |
734 | .suspend = media_bay_suspend, | 736 | .suspend = media_bay_suspend, |
735 | .resume = media_bay_resume | 737 | .resume = media_bay_resume |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 12946c5f583..53cce3a5da2 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
@@ -584,9 +584,11 @@ static struct of_device_id rackmeter_match[] = { | |||
584 | }; | 584 | }; |
585 | 585 | ||
586 | static struct macio_driver rackmeter_driver = { | 586 | static struct macio_driver rackmeter_driver = { |
587 | .name = "rackmeter", | 587 | .driver = { |
588 | .owner = THIS_MODULE, | 588 | .name = "rackmeter", |
589 | .match_table = rackmeter_match, | 589 | .owner = THIS_MODULE, |
590 | .of_match_table = rackmeter_match, | ||
591 | }, | ||
590 | .probe = rackmeter_probe, | 592 | .probe = rackmeter_probe, |
591 | .remove = __devexit_p(rackmeter_remove), | 593 | .remove = __devexit_p(rackmeter_remove), |
592 | .shutdown = rackmeter_shutdown, | 594 | .shutdown = rackmeter_shutdown, |