]> err.no Git - linux-2.6/blobdiff - drivers/macintosh/therm_adt746x.c
Pull sony into release branch
[linux-2.6] / drivers / macintosh / therm_adt746x.c
index 5ebfd1d138dafc027d3c1c0ed37f926e010f0834..a7ce559266380596a045657ed14ae12efd4f5bb6 100644 (file)
@@ -9,7 +9,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/suspend.h>
 #include <linux/kthread.h>
 #include <linux/moduleparam.h>
+#include <linux/freezer.h>
 
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/sections.h>
-#include <asm/of_device.h>
+#include <asm/of_platform.h>
 
 #undef DEBUG
 
@@ -48,11 +48,11 @@ static u8 FAN_SPD_SET[2] = {0x30, 0x31};
 
 static u8 default_limits_local[3] = {70, 50, 70};    /* local, sensor1, sensor2 */
 static u8 default_limits_chip[3] = {80, 65, 80};    /* local, sensor1, sensor2 */
-static char *sensor_location[3] = {NULL, NULL, NULL};
+static const char *sensor_location[3];
 
-static int limit_adjust = 0;
+static int limit_adjust;
 static int fan_speed = -1;
-static int verbose = 0;
+static int verbose;
 
 MODULE_AUTHOR("Colin Leroy <colin@colino.net>");
 MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and "
@@ -554,7 +554,7 @@ static int __init
 thermostat_init(void)
 {
        struct device_node* np;
-       u32 *prop;
+       const u32 *prop;
        int i = 0, offset = 0;
        
        np = of_find_node_by_name(NULL, "fan");
@@ -567,13 +567,13 @@ thermostat_init(void)
        else
                return -ENODEV;
 
-       prop = (u32 *)get_property(np, "hwsensor-params-version", NULL);
+       prop = get_property(np, "hwsensor-params-version", NULL);
        printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop,
                         (*prop == 1)?"":"un");
        if (*prop != 1)
                return -ENODEV;
 
-       prop = (u32 *)get_property(np, "reg", NULL);
+       prop = get_property(np, "reg", NULL);
        if (!prop)
                return -ENODEV;
 
@@ -627,8 +627,8 @@ thermostat_init(void)
        if(therm_type == ADT7460)
                device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
 
-#ifndef CONFIG_I2C_KEYWEST
-       request_module("i2c-keywest");
+#ifndef CONFIG_I2C_POWERMAC
+       request_module("i2c-powermac");
 #endif
 
        return i2c_add_driver(&thermostat_driver);