]> err.no Git - linux-2.6/blobdiff - drivers/macintosh/therm_windtunnel.c
[PATCH] PCI: restore BAR values after D3hot->D0 for devices that need it
[linux-2.6] / drivers / macintosh / therm_windtunnel.c
index c153699d0f842bed724ae6aaab09bf9e35cfad97..cbb72eb0426d493c9691f1deadb66915037df54b 100644 (file)
@@ -43,6 +43,7 @@
 #include <asm/system.h>
 #include <asm/sections.h>
 #include <asm/of_device.h>
+#include <asm/macio.h>
 
 #define LOG_TEMP               0                       /* continously log temperature */
 
 static int                     do_probe( struct i2c_adapter *adapter, int addr, int kind);
 
 /* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */
-static unsigned short          normal_i2c[] = { 0x49, 0x2c, I2C_CLIENT_END };
-static unsigned short          normal_i2c_range[] = { 0x48, 0x4f, 0x2c, 0x2f, I2C_CLIENT_END };
+static unsigned short          normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
+                                                0x4c, 0x4d, 0x4e, 0x4f,
+                                                0x2c, 0x2d, 0x2e, 0x2f,
+                                                I2C_CLIENT_END };
 
 I2C_CLIENT_INSMOD;
 
@@ -107,13 +110,13 @@ print_temp( const char *s, int temp )
 }
 
 static ssize_t
-show_cpu_temperature( struct device *dev, char *buf )
+show_cpu_temperature( struct device *dev, struct device_attribute *attr, char *buf )
 {
        return sprintf(buf, "%d.%d\n", x.temp>>8, (x.temp & 255)*10/256 );
 }
 
 static ssize_t
-show_case_temperature( struct device *dev, char *buf )
+show_case_temperature( struct device *dev, struct device_attribute *attr, char *buf )
 {
        return sprintf(buf, "%d.%d\n", x.casetemp>>8, (x.casetemp & 255)*10/256 );
 }
@@ -448,7 +451,7 @@ do_probe( struct i2c_adapter *adapter, int addr, int kind )
 /************************************************************************/
 
 static int
-therm_of_probe( struct of_device *dev, const struct of_match *match )
+therm_of_probe( struct of_device *dev, const struct of_device_id *match )
 {
        return i2c_add_driver( &g4fan_driver );
 }
@@ -459,9 +462,8 @@ therm_of_remove( struct of_device *dev )
        return i2c_del_driver( &g4fan_driver );
 }
 
-static struct of_match therm_of_match[] = {{
+static struct of_device_id therm_of_match[] = {{
        .name           = "fan",
-       .type           = OF_ANY_MATCH,
        .compatible     = "adm1030"
     }, {}
 };