]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/lm80.c
Merge rsync://bughost.org/repos/ieee80211-delta/
[linux-2.6-omap-h63xx.git] / drivers / hwmon / lm80.c
index 83af8b3a0cac02ba04ef70f1ec4b8f118de210b5..c359fdea211eddaba1e520fe919427f8a3d3bf3a 100644 (file)
@@ -393,7 +393,7 @@ static int lm80_attach_adapter(struct i2c_adapter *adapter)
        return i2c_probe(adapter, &addr_data, lm80_detect);
 }
 
-int lm80_detect(struct i2c_adapter *adapter, int address, int kind)
+static int lm80_detect(struct i2c_adapter *adapter, int address, int kind)
 {
        int i, cur;
        struct i2c_client *new_client;
@@ -407,11 +407,10 @@ int lm80_detect(struct i2c_adapter *adapter, int address, int kind)
        /* OK. For now, we presume we have a valid client. We now create the
           client structure, even though we cannot fill it completely yet.
           But it allows us to access lm80_{read,write}_value. */
-       if (!(data = kmalloc(sizeof(struct lm80_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct lm80_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct lm80_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);