diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-10 19:16:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-10 19:16:33 -0400 |
commit | 3c693024cffa5c96a20b969f4efd058675e7700f (patch) | |
tree | 2e49a90c3e67a898770fe0ea735d00326dbe3f69 /drivers | |
parent | 107c3a73e0ee037322efa00fa3cb45b3b7eb6069 (diff) | |
parent | 10270613fb4d5a44c335cfa13e9626bf5743c01d (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Fix windfarm platform device usage
[POWERPC] Fix i2c-powermac platform device usage
[POWERPC] Fix secondary CPU startup on old "powersurge" SMP powermacs
[POWERPC] ARCH=ppc pt_regs fixes
[POWERPC] Update maple defconfig
[POWERPC] Fix Maple secondary IDE interrupt
[POWERPC] Make U4 PCIe work on maple
[POWERPC] cell: fix default zImage build target
[POWERPC] Fix boot wrapper invocation if CROSS_COMPILE contains spaces
[POWERPC] Fix xmon IRQ handler for pt_regs removal
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-powermac.c | 28 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm112.c | 18 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm81.c | 24 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm91.c | 24 |
4 files changed, 45 insertions, 49 deletions
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index a508cb962d24..648d55533d87 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c | |||
@@ -182,9 +182,9 @@ static const struct i2c_algorithm i2c_powermac_algorithm = { | |||
182 | }; | 182 | }; |
183 | 183 | ||
184 | 184 | ||
185 | static int i2c_powermac_remove(struct device *dev) | 185 | static int i2c_powermac_remove(struct platform_device *dev) |
186 | { | 186 | { |
187 | struct i2c_adapter *adapter = dev_get_drvdata(dev); | 187 | struct i2c_adapter *adapter = platform_get_drvdata(dev); |
188 | struct pmac_i2c_bus *bus = i2c_get_adapdata(adapter); | 188 | struct pmac_i2c_bus *bus = i2c_get_adapdata(adapter); |
189 | int rc; | 189 | int rc; |
190 | 190 | ||
@@ -195,16 +195,16 @@ static int i2c_powermac_remove(struct device *dev) | |||
195 | if (rc) | 195 | if (rc) |
196 | printk("i2c-powermac.c: Failed to remove bus %s !\n", | 196 | printk("i2c-powermac.c: Failed to remove bus %s !\n", |
197 | adapter->name); | 197 | adapter->name); |
198 | dev_set_drvdata(dev, NULL); | 198 | platform_set_drvdata(dev, NULL); |
199 | kfree(adapter); | 199 | kfree(adapter); |
200 | 200 | ||
201 | return 0; | 201 | return 0; |
202 | } | 202 | } |
203 | 203 | ||
204 | 204 | ||
205 | static int i2c_powermac_probe(struct device *dev) | 205 | static int __devexit i2c_powermac_probe(struct platform_device *dev) |
206 | { | 206 | { |
207 | struct pmac_i2c_bus *bus = dev->platform_data; | 207 | struct pmac_i2c_bus *bus = dev->dev.platform_data; |
208 | struct device_node *parent = NULL; | 208 | struct device_node *parent = NULL; |
209 | struct i2c_adapter *adapter; | 209 | struct i2c_adapter *adapter; |
210 | char name[32]; | 210 | char name[32]; |
@@ -246,11 +246,11 @@ static int i2c_powermac_probe(struct device *dev) | |||
246 | printk(KERN_ERR "i2c-powermac: can't allocate inteface !\n"); | 246 | printk(KERN_ERR "i2c-powermac: can't allocate inteface !\n"); |
247 | return -ENOMEM; | 247 | return -ENOMEM; |
248 | } | 248 | } |
249 | dev_set_drvdata(dev, adapter); | 249 | platform_set_drvdata(dev, adapter); |
250 | strcpy(adapter->name, name); | 250 | strcpy(adapter->name, name); |
251 | adapter->algo = &i2c_powermac_algorithm; | 251 | adapter->algo = &i2c_powermac_algorithm; |
252 | i2c_set_adapdata(adapter, bus); | 252 | i2c_set_adapdata(adapter, bus); |
253 | adapter->dev.parent = dev; | 253 | adapter->dev.parent = &dev->dev; |
254 | pmac_i2c_attach_adapter(bus, adapter); | 254 | pmac_i2c_attach_adapter(bus, adapter); |
255 | rc = i2c_add_adapter(adapter); | 255 | rc = i2c_add_adapter(adapter); |
256 | if (rc) { | 256 | if (rc) { |
@@ -265,23 +265,25 @@ static int i2c_powermac_probe(struct device *dev) | |||
265 | } | 265 | } |
266 | 266 | ||
267 | 267 | ||
268 | static struct device_driver i2c_powermac_driver = { | 268 | static struct platform_driver i2c_powermac_driver = { |
269 | .name = "i2c-powermac", | ||
270 | .bus = &platform_bus_type, | ||
271 | .probe = i2c_powermac_probe, | 269 | .probe = i2c_powermac_probe, |
272 | .remove = i2c_powermac_remove, | 270 | .remove = __devexit_p(i2c_powermac_remove), |
271 | .driver = { | ||
272 | .name = "i2c-powermac", | ||
273 | .bus = &platform_bus_type, | ||
274 | }, | ||
273 | }; | 275 | }; |
274 | 276 | ||
275 | static int __init i2c_powermac_init(void) | 277 | static int __init i2c_powermac_init(void) |
276 | { | 278 | { |
277 | driver_register(&i2c_powermac_driver); | 279 | platform_driver_register(&i2c_powermac_driver); |
278 | return 0; | 280 | return 0; |
279 | } | 281 | } |
280 | 282 | ||
281 | 283 | ||
282 | static void __exit i2c_powermac_cleanup(void) | 284 | static void __exit i2c_powermac_cleanup(void) |
283 | { | 285 | { |
284 | driver_unregister(&i2c_powermac_driver); | 286 | platform_driver_unregister(&i2c_powermac_driver); |
285 | } | 287 | } |
286 | 288 | ||
287 | module_init(i2c_powermac_init); | 289 | module_init(i2c_powermac_init); |
diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c index ef66bf2778ec..fa4b13f89369 100644 --- a/drivers/macintosh/windfarm_pm112.c +++ b/drivers/macintosh/windfarm_pm112.c | |||
@@ -650,24 +650,26 @@ static struct notifier_block pm112_events = { | |||
650 | .notifier_call = pm112_wf_notify, | 650 | .notifier_call = pm112_wf_notify, |
651 | }; | 651 | }; |
652 | 652 | ||
653 | static int wf_pm112_probe(struct device *dev) | 653 | static int wf_pm112_probe(struct platform_device *dev) |
654 | { | 654 | { |
655 | wf_register_client(&pm112_events); | 655 | wf_register_client(&pm112_events); |
656 | return 0; | 656 | return 0; |
657 | } | 657 | } |
658 | 658 | ||
659 | static int wf_pm112_remove(struct device *dev) | 659 | static int __devexit wf_pm112_remove(struct platform_device *dev) |
660 | { | 660 | { |
661 | wf_unregister_client(&pm112_events); | 661 | wf_unregister_client(&pm112_events); |
662 | /* should release all sensors and controls */ | 662 | /* should release all sensors and controls */ |
663 | return 0; | 663 | return 0; |
664 | } | 664 | } |
665 | 665 | ||
666 | static struct device_driver wf_pm112_driver = { | 666 | static struct platform_driver wf_pm112_driver = { |
667 | .name = "windfarm", | ||
668 | .bus = &platform_bus_type, | ||
669 | .probe = wf_pm112_probe, | 667 | .probe = wf_pm112_probe, |
670 | .remove = wf_pm112_remove, | 668 | .remove = __devexit_p(wf_pm112_remove), |
669 | .driver = { | ||
670 | .name = "windfarm", | ||
671 | .bus = &platform_bus_type, | ||
672 | }, | ||
671 | }; | 673 | }; |
672 | 674 | ||
673 | static int __init wf_pm112_init(void) | 675 | static int __init wf_pm112_init(void) |
@@ -683,13 +685,13 @@ static int __init wf_pm112_init(void) | |||
683 | ++nr_cores; | 685 | ++nr_cores; |
684 | 686 | ||
685 | printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n"); | 687 | printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n"); |
686 | driver_register(&wf_pm112_driver); | 688 | platform_driver_register(&wf_pm112_driver); |
687 | return 0; | 689 | return 0; |
688 | } | 690 | } |
689 | 691 | ||
690 | static void __exit wf_pm112_exit(void) | 692 | static void __exit wf_pm112_exit(void) |
691 | { | 693 | { |
692 | driver_unregister(&wf_pm112_driver); | 694 | platform_driver_unregister(&wf_pm112_driver); |
693 | } | 695 | } |
694 | 696 | ||
695 | module_init(wf_pm112_init); | 697 | module_init(wf_pm112_init); |
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c index 2ff546e4c92f..2a944851b8e1 100644 --- a/drivers/macintosh/windfarm_pm81.c +++ b/drivers/macintosh/windfarm_pm81.c | |||
@@ -131,8 +131,6 @@ | |||
131 | 131 | ||
132 | static int wf_smu_mach_model; /* machine model id */ | 132 | static int wf_smu_mach_model; /* machine model id */ |
133 | 133 | ||
134 | static struct device *wf_smu_dev; | ||
135 | |||
136 | /* Controls & sensors */ | 134 | /* Controls & sensors */ |
137 | static struct wf_sensor *sensor_cpu_power; | 135 | static struct wf_sensor *sensor_cpu_power; |
138 | static struct wf_sensor *sensor_cpu_temp; | 136 | static struct wf_sensor *sensor_cpu_temp; |
@@ -717,16 +715,14 @@ static int wf_init_pm(void) | |||
717 | return 0; | 715 | return 0; |
718 | } | 716 | } |
719 | 717 | ||
720 | static int wf_smu_probe(struct device *ddev) | 718 | static int wf_smu_probe(struct platform_device *ddev) |
721 | { | 719 | { |
722 | wf_smu_dev = ddev; | ||
723 | |||
724 | wf_register_client(&wf_smu_events); | 720 | wf_register_client(&wf_smu_events); |
725 | 721 | ||
726 | return 0; | 722 | return 0; |
727 | } | 723 | } |
728 | 724 | ||
729 | static int wf_smu_remove(struct device *ddev) | 725 | static int __devexit wf_smu_remove(struct platform_device *ddev) |
730 | { | 726 | { |
731 | wf_unregister_client(&wf_smu_events); | 727 | wf_unregister_client(&wf_smu_events); |
732 | 728 | ||
@@ -766,16 +762,16 @@ static int wf_smu_remove(struct device *ddev) | |||
766 | if (wf_smu_cpu_fans) | 762 | if (wf_smu_cpu_fans) |
767 | kfree(wf_smu_cpu_fans); | 763 | kfree(wf_smu_cpu_fans); |
768 | 764 | ||
769 | wf_smu_dev = NULL; | ||
770 | |||
771 | return 0; | 765 | return 0; |
772 | } | 766 | } |
773 | 767 | ||
774 | static struct device_driver wf_smu_driver = { | 768 | static struct platform_driver wf_smu_driver = { |
775 | .name = "windfarm", | ||
776 | .bus = &platform_bus_type, | ||
777 | .probe = wf_smu_probe, | 769 | .probe = wf_smu_probe, |
778 | .remove = wf_smu_remove, | 770 | .remove = __devexit_p(wf_smu_remove), |
771 | .driver = { | ||
772 | .name = "windfarm", | ||
773 | .bus = &platform_bus_type, | ||
774 | }, | ||
779 | }; | 775 | }; |
780 | 776 | ||
781 | 777 | ||
@@ -794,7 +790,7 @@ static int __init wf_smu_init(void) | |||
794 | request_module("windfarm_lm75_sensor"); | 790 | request_module("windfarm_lm75_sensor"); |
795 | 791 | ||
796 | #endif /* MODULE */ | 792 | #endif /* MODULE */ |
797 | driver_register(&wf_smu_driver); | 793 | platform_driver_register(&wf_smu_driver); |
798 | } | 794 | } |
799 | 795 | ||
800 | return rc; | 796 | return rc; |
@@ -803,7 +799,7 @@ static int __init wf_smu_init(void) | |||
803 | static void __exit wf_smu_exit(void) | 799 | static void __exit wf_smu_exit(void) |
804 | { | 800 | { |
805 | 801 | ||
806 | driver_unregister(&wf_smu_driver); | 802 | platform_driver_unregister(&wf_smu_driver); |
807 | } | 803 | } |
808 | 804 | ||
809 | 805 | ||
diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c index 59e9ffe37c39..9961a67b4f85 100644 --- a/drivers/macintosh/windfarm_pm91.c +++ b/drivers/macintosh/windfarm_pm91.c | |||
@@ -63,8 +63,6 @@ | |||
63 | */ | 63 | */ |
64 | #undef HACKED_OVERTEMP | 64 | #undef HACKED_OVERTEMP |
65 | 65 | ||
66 | static struct device *wf_smu_dev; | ||
67 | |||
68 | /* Controls & sensors */ | 66 | /* Controls & sensors */ |
69 | static struct wf_sensor *sensor_cpu_power; | 67 | static struct wf_sensor *sensor_cpu_power; |
70 | static struct wf_sensor *sensor_cpu_temp; | 68 | static struct wf_sensor *sensor_cpu_temp; |
@@ -641,16 +639,14 @@ static int wf_init_pm(void) | |||
641 | return 0; | 639 | return 0; |
642 | } | 640 | } |
643 | 641 | ||
644 | static int wf_smu_probe(struct device *ddev) | 642 | static int wf_smu_probe(struct platform_device *ddev) |
645 | { | 643 | { |
646 | wf_smu_dev = ddev; | ||
647 | |||
648 | wf_register_client(&wf_smu_events); | 644 | wf_register_client(&wf_smu_events); |
649 | 645 | ||
650 | return 0; | 646 | return 0; |
651 | } | 647 | } |
652 | 648 | ||
653 | static int wf_smu_remove(struct device *ddev) | 649 | static int __devexit wf_smu_remove(struct platform_device *ddev) |
654 | { | 650 | { |
655 | wf_unregister_client(&wf_smu_events); | 651 | wf_unregister_client(&wf_smu_events); |
656 | 652 | ||
@@ -698,16 +694,16 @@ static int wf_smu_remove(struct device *ddev) | |||
698 | if (wf_smu_cpu_fans) | 694 | if (wf_smu_cpu_fans) |
699 | kfree(wf_smu_cpu_fans); | 695 | kfree(wf_smu_cpu_fans); |
700 | 696 | ||
701 | wf_smu_dev = NULL; | ||
702 | |||
703 | return 0; | 697 | return 0; |
704 | } | 698 | } |
705 | 699 | ||
706 | static struct device_driver wf_smu_driver = { | 700 | static struct platform_driver wf_smu_driver = { |
707 | .name = "windfarm", | ||
708 | .bus = &platform_bus_type, | ||
709 | .probe = wf_smu_probe, | 701 | .probe = wf_smu_probe, |
710 | .remove = wf_smu_remove, | 702 | .remove = __devexit_p(wf_smu_remove), |
703 | .driver = { | ||
704 | .name = "windfarm", | ||
705 | .bus = &platform_bus_type, | ||
706 | }, | ||
711 | }; | 707 | }; |
712 | 708 | ||
713 | 709 | ||
@@ -725,7 +721,7 @@ static int __init wf_smu_init(void) | |||
725 | request_module("windfarm_lm75_sensor"); | 721 | request_module("windfarm_lm75_sensor"); |
726 | 722 | ||
727 | #endif /* MODULE */ | 723 | #endif /* MODULE */ |
728 | driver_register(&wf_smu_driver); | 724 | platform_driver_register(&wf_smu_driver); |
729 | } | 725 | } |
730 | 726 | ||
731 | return rc; | 727 | return rc; |
@@ -734,7 +730,7 @@ static int __init wf_smu_init(void) | |||
734 | static void __exit wf_smu_exit(void) | 730 | static void __exit wf_smu_exit(void) |
735 | { | 731 | { |
736 | 732 | ||
737 | driver_unregister(&wf_smu_driver); | 733 | platform_driver_unregister(&wf_smu_driver); |
738 | } | 734 | } |
739 | 735 | ||
740 | 736 | ||