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 | ||||
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_lm75_sensor.c | 5 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_max6690_sensor.c | 1 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_sat.c | 1 |
7 files changed, 14 insertions, 17 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 97147804a49c..b6e7ddc09d76 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 288acce76b74..2fd435bc542e 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 12946c5f583f..53cce3a5da23 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, |
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 16d82f17ae82..c42eeb43042d 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -182,7 +182,6 @@ remove_thermostat(struct i2c_client *client) | |||
182 | 182 | ||
183 | thermostat = NULL; | 183 | thermostat = NULL; |
184 | 184 | ||
185 | i2c_set_clientdata(client, NULL); | ||
186 | kfree(th); | 185 | kfree(th); |
187 | 186 | ||
188 | return 0; | 187 | return 0; |
@@ -400,7 +399,6 @@ static int probe_thermostat(struct i2c_client *client, | |||
400 | rc = read_reg(th, CONFIG_REG); | 399 | rc = read_reg(th, CONFIG_REG); |
401 | if (rc < 0) { | 400 | if (rc < 0) { |
402 | dev_err(&client->dev, "Thermostat failed to read config!\n"); | 401 | dev_err(&client->dev, "Thermostat failed to read config!\n"); |
403 | i2c_set_clientdata(client, NULL); | ||
404 | kfree(th); | 402 | kfree(th); |
405 | return -ENODEV; | 403 | return -ENODEV; |
406 | } | 404 | } |
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index d8257d35afde..647c6add2193 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c | |||
@@ -107,10 +107,8 @@ static int wf_lm75_probe(struct i2c_client *client, | |||
107 | i2c_set_clientdata(client, lm); | 107 | i2c_set_clientdata(client, lm); |
108 | 108 | ||
109 | rc = wf_register_sensor(&lm->sens); | 109 | rc = wf_register_sensor(&lm->sens); |
110 | if (rc) { | 110 | if (rc) |
111 | i2c_set_clientdata(client, NULL); | ||
112 | kfree(lm); | 111 | kfree(lm); |
113 | } | ||
114 | 112 | ||
115 | return rc; | 113 | return rc; |
116 | } | 114 | } |
@@ -216,7 +214,6 @@ static int wf_lm75_remove(struct i2c_client *client) | |||
216 | /* release sensor */ | 214 | /* release sensor */ |
217 | wf_unregister_sensor(&lm->sens); | 215 | wf_unregister_sensor(&lm->sens); |
218 | 216 | ||
219 | i2c_set_clientdata(client, NULL); | ||
220 | return 0; | 217 | return 0; |
221 | } | 218 | } |
222 | 219 | ||
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c index b486eb929fde..8204113268f4 100644 --- a/drivers/macintosh/windfarm_max6690_sensor.c +++ b/drivers/macintosh/windfarm_max6690_sensor.c | |||
@@ -81,7 +81,6 @@ static int wf_max6690_probe(struct i2c_client *client, | |||
81 | 81 | ||
82 | rc = wf_register_sensor(&max->sens); | 82 | rc = wf_register_sensor(&max->sens); |
83 | if (rc) { | 83 | if (rc) { |
84 | i2c_set_clientdata(client, NULL); | ||
85 | kfree(max); | 84 | kfree(max); |
86 | } | 85 | } |
87 | 86 | ||
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index e20330a28959..65a8ff3e1f8e 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c | |||
@@ -376,7 +376,6 @@ static int wf_sat_remove(struct i2c_client *client) | |||
376 | /* XXX TODO */ | 376 | /* XXX TODO */ |
377 | 377 | ||
378 | sat->i2c = NULL; | 378 | sat->i2c = NULL; |
379 | i2c_set_clientdata(client, NULL); | ||
380 | return 0; | 379 | return 0; |
381 | } | 380 | } |
382 | 381 | ||