diff options
Diffstat (limited to 'drivers/macintosh/windfarm_pm81.c')
-rw-r--r-- | drivers/macintosh/windfarm_pm81.c | 24 |
1 files changed, 10 insertions, 14 deletions
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 | ||