]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/smsc47m1.c
[PATCH] ipmi: poweroff cleanups
[linux-2.6-omap-h63xx.git] / drivers / hwmon / smsc47m1.c
index c9cc683eba4a9f85d7cda47ef9c1a3023402221f..5905c1af88f21ab2dd65c358a06b950cd4a004b1 100644 (file)
@@ -3,7 +3,7 @@
                  for hardware monitoring
 
     Supports the SMSC LPC47B27x, LPC47M10x, LPC47M13x, LPC47M14x,
-    LPC47M15x and LPC47M192 Super-I/O chips.
+    LPC47M15x, LPC47M192 and LPC47M997 Super-I/O chips.
 
     Copyright (C) 2002 Mark D. Studebaker <mdsxyz123@yahoo.com>
     Copyright (C) 2004 Jean Delvare <khali@linux-fr.org>
@@ -356,6 +356,8 @@ static int __init smsc47m1_find(unsigned short *addr)
         * 0x5F) and LPC47B27x (device id 0x51) have fan control.
         * The LPC47M15x and LPC47M192 chips "with hardware monitoring block"
         * can do much more besides (device id 0x60).
+        * The LPC47M997 is undocumented, but seems to be compatible with
+        * the LPC47M192, and has the same device id.
         */
        if (val == 0x51)
                printk(KERN_INFO "smsc47m1: Found SMSC LPC47B27x\n");
@@ -364,7 +366,8 @@ static int __init smsc47m1_find(unsigned short *addr)
        else if (val == 0x5F)
                printk(KERN_INFO "smsc47m1: Found SMSC LPC47M14x\n");
        else if (val == 0x60)
-               printk(KERN_INFO "smsc47m1: Found SMSC LPC47M15x/LPC47M192\n");
+               printk(KERN_INFO "smsc47m1: Found SMSC "
+                      "LPC47M15x/LPC47M192/LPC47M997\n");
        else {
                superio_exit();
                return -ENODEV;
@@ -396,11 +399,10 @@ static int smsc47m1_detect(struct i2c_adapter *adapter)
                return -EBUSY;
        }
 
-       if (!(data = kmalloc(sizeof(struct smsc47m1_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct smsc47m1_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto error_release;
        }
-       memset(data, 0x00, sizeof(struct smsc47m1_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);