diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/adb.c | 10 | ||||
-rw-r--r-- | drivers/macintosh/macio_asic.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/rack-meter.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/therm_windtunnel.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu-backlight.c | 1 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm112.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm121.c | 5 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm72.c | 7 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm81.c | 8 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm91.c | 8 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_rm31.c | 7 |
11 files changed, 25 insertions, 39 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index 057b0221f6..b0407c5fad 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c @@ -74,7 +74,9 @@ static struct adb_driver *adb_driver_list[] = { NULL }; -static struct class *adb_dev_class; +static const struct class adb_dev_class = { + .name = "adb", +}; static struct adb_driver *adb_controller; BLOCKING_NOTIFIER_HEAD(adb_client_list); @@ -888,10 +890,10 @@ adbdev_init(void) return; } - adb_dev_class = class_create("adb"); - if (IS_ERR(adb_dev_class)) + if (class_register(&adb_dev_class)) return; - device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb"); + + device_create(&adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb"); platform_device_register(&adb_pfdev); platform_driver_probe(&adb_pfdrv, adb_dummy_probe); diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index a5ee8f736a..565f1e21ff 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c @@ -136,7 +136,7 @@ static int macio_device_modalias(const struct device *dev, struct kobj_uevent_en extern const struct attribute_group *macio_dev_groups[]; -struct bus_type macio_bus_type = { +const struct bus_type macio_bus_type = { .name = "macio", .match = macio_bus_match, .uevent = macio_device_modalias, diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 40240bce77..896a43bd81 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -523,7 +523,7 @@ static int rackmeter_probe(struct macio_dev* mdev, return rc; } -static int rackmeter_remove(struct macio_dev* mdev) +static void rackmeter_remove(struct macio_dev *mdev) { struct rackmeter *rm = dev_get_drvdata(&mdev->ofdev.dev); @@ -558,8 +558,6 @@ static int rackmeter_remove(struct macio_dev* mdev) /* Get rid of me */ kfree(rm); - - return 0; } static int rackmeter_shutdown(struct macio_dev* mdev) diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 3c1b29476c..37cdc6931f 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c @@ -481,11 +481,9 @@ static int therm_of_probe(struct platform_device *dev) return -ENODEV; } -static int -therm_of_remove( struct platform_device *dev ) +static void therm_of_remove(struct platform_device *dev) { i2c_del_driver( &g4fan_driver ); - return 0; } static const struct of_device_id therm_of_match[] = {{ @@ -501,7 +499,7 @@ static struct platform_driver therm_of_driver = { .of_match_table = therm_of_match, }, .probe = therm_of_probe, - .remove = therm_of_remove, + .remove_new = therm_of_remove, }; struct apple_thermal_info { diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c index c2d87e7fa8..89450645c2 100644 --- a/drivers/macintosh/via-pmu-backlight.c +++ b/drivers/macintosh/via-pmu-backlight.c @@ -10,6 +10,7 @@ #include <asm/ptrace.h> #include <linux/adb.h> +#include <linux/backlight.h> #include <linux/pmu.h> #include <asm/backlight.h> diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c index d1dec314ae..876b4d8cbe 100644 --- a/drivers/macintosh/windfarm_pm112.c +++ b/drivers/macintosh/windfarm_pm112.c @@ -662,16 +662,14 @@ static int wf_pm112_probe(struct platform_device *dev) return 0; } -static int wf_pm112_remove(struct platform_device *dev) +static void wf_pm112_remove(struct platform_device *dev) { wf_unregister_client(&pm112_events); - /* should release all sensors and controls */ - return 0; } static struct platform_driver wf_pm112_driver = { .probe = wf_pm112_probe, - .remove = wf_pm112_remove, + .remove_new = wf_pm112_remove, .driver = { .name = "windfarm", }, diff --git a/drivers/macintosh/windfarm_pm121.c b/drivers/macintosh/windfarm_pm121.c index 82500417eb..cd45fbc4fe 100644 --- a/drivers/macintosh/windfarm_pm121.c +++ b/drivers/macintosh/windfarm_pm121.c @@ -992,15 +992,14 @@ static int pm121_probe(struct platform_device *ddev) return 0; } -static int pm121_remove(struct platform_device *ddev) +static void pm121_remove(struct platform_device *ddev) { wf_unregister_client(&pm121_events); - return 0; } static struct platform_driver pm121_driver = { .probe = pm121_probe, - .remove = pm121_remove, + .remove_new = pm121_remove, .driver = { .name = "windfarm", .bus = &platform_bus_type, diff --git a/drivers/macintosh/windfarm_pm72.c b/drivers/macintosh/windfarm_pm72.c index e21f973551..14fa1e9ac3 100644 --- a/drivers/macintosh/windfarm_pm72.c +++ b/drivers/macintosh/windfarm_pm72.c @@ -775,17 +775,14 @@ static int wf_pm72_probe(struct platform_device *dev) return 0; } -static int wf_pm72_remove(struct platform_device *dev) +static void wf_pm72_remove(struct platform_device *dev) { wf_unregister_client(&pm72_events); - - /* should release all sensors and controls */ - return 0; } static struct platform_driver wf_pm72_driver = { .probe = wf_pm72_probe, - .remove = wf_pm72_remove, + .remove_new = wf_pm72_remove, .driver = { .name = "windfarm", }, diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c index 257fb2c695..404d2454e3 100644 --- a/drivers/macintosh/windfarm_pm81.c +++ b/drivers/macintosh/windfarm_pm81.c @@ -724,7 +724,7 @@ static int wf_smu_probe(struct platform_device *ddev) return 0; } -static int wf_smu_remove(struct platform_device *ddev) +static void wf_smu_remove(struct platform_device *ddev) { wf_unregister_client(&wf_smu_events); @@ -761,13 +761,11 @@ static int wf_smu_remove(struct platform_device *ddev) /* Destroy control loops state structures */ kfree(wf_smu_sys_fans); kfree(wf_smu_cpu_fans); - - return 0; } static struct platform_driver wf_smu_driver = { - .probe = wf_smu_probe, - .remove = wf_smu_remove, + .probe = wf_smu_probe, + .remove_new = wf_smu_remove, .driver = { .name = "windfarm", }, diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c index 120a9cfba0..fba02a3754 100644 --- a/drivers/macintosh/windfarm_pm91.c +++ b/drivers/macintosh/windfarm_pm91.c @@ -647,7 +647,7 @@ static int wf_smu_probe(struct platform_device *ddev) return 0; } -static int wf_smu_remove(struct platform_device *ddev) +static void wf_smu_remove(struct platform_device *ddev) { wf_unregister_client(&wf_smu_events); @@ -691,13 +691,11 @@ static int wf_smu_remove(struct platform_device *ddev) kfree(wf_smu_slots_fans); kfree(wf_smu_drive_fans); kfree(wf_smu_cpu_fans); - - return 0; } static struct platform_driver wf_smu_driver = { - .probe = wf_smu_probe, - .remove = wf_smu_remove, + .probe = wf_smu_probe, + .remove_new = wf_smu_remove, .driver = { .name = "windfarm", }, diff --git a/drivers/macintosh/windfarm_rm31.c b/drivers/macintosh/windfarm_rm31.c index e9eb7fdde4..dc8f2c7ef1 100644 --- a/drivers/macintosh/windfarm_rm31.c +++ b/drivers/macintosh/windfarm_rm31.c @@ -668,17 +668,14 @@ static int wf_rm31_probe(struct platform_device *dev) return 0; } -static int wf_rm31_remove(struct platform_device *dev) +static void wf_rm31_remove(struct platform_device *dev) { wf_unregister_client(&rm31_events); - - /* should release all sensors and controls */ - return 0; } static struct platform_driver wf_rm31_driver = { .probe = wf_rm31_probe, - .remove = wf_rm31_remove, + .remove_new = wf_rm31_remove, .driver = { .name = "windfarm", }, |