Merge branch 'pxa-plat' into devel
[powerpc.git] / drivers / macintosh / therm_windtunnel.c
index 35233de..b66da74 100644 (file)
 
 #define LOG_TEMP               0                       /* continously log temperature */
 
-#define I2C_DRIVERID_G4FAN     0x9001                  /* fixme */
-
 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[] = { 0x48, 0x49, 0x4a, 0x4b,
+static const unsigned short    normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
                                                 0x4c, 0x4d, 0x4e, 0x4f,
                                                 0x2c, 0x2d, 0x2e, 0x2f,
                                                 I2C_CLIENT_END };
@@ -357,7 +355,6 @@ static struct i2c_driver g4fan_driver = {
        .driver = {
                .name   = "therm_windtunnel",
        },
-       .id             = I2C_DRIVERID_G4FAN,
        .attach_adapter = do_attach,
        .detach_client  = do_detach,
 };
@@ -431,9 +428,8 @@ do_probe( struct i2c_adapter *adapter, int addr, int kind )
                                     | I2C_FUNC_SMBUS_WRITE_BYTE) )
                return 0;
 
-       if( !(cl=kmalloc(sizeof(*cl), GFP_KERNEL)) )
+       if( !(cl=kzalloc(sizeof(*cl), GFP_KERNEL)) )
                return -ENOMEM;
-       memset( cl, 0, sizeof(struct i2c_client) );
 
        cl->addr = addr;
        cl->adapter = adapter;
@@ -459,7 +455,8 @@ therm_of_probe( struct of_device *dev, const struct of_device_id *match )
 static int
 therm_of_remove( struct of_device *dev )
 {
-       return i2c_del_driver( &g4fan_driver );
+       i2c_del_driver( &g4fan_driver );
+       return 0;
 }
 
 static struct of_device_id therm_of_match[] = {{