]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/fscpos.c
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / drivers / hwmon / fscpos.c
index 5fc77a5fed07b4b25d8fc21d27e22cc55a6a71a9..64e4edc64f8d40bcd93f8d0c4c4978b7dd9f6b2c 100644 (file)
@@ -438,7 +438,7 @@ static int fscpos_attach_adapter(struct i2c_adapter *adapter)
        return i2c_probe(adapter, &addr_data, fscpos_detect);
 }
 
-int fscpos_detect(struct i2c_adapter *adapter, int address, int kind)
+static int fscpos_detect(struct i2c_adapter *adapter, int address, int kind)
 {
        struct i2c_client *new_client;
        struct fscpos_data *data;
@@ -453,11 +453,10 @@ int fscpos_detect(struct i2c_adapter *adapter, int address, int kind)
         * But it allows us to access fscpos_{read,write}_value.
         */
 
-       if (!(data = kmalloc(sizeof(struct fscpos_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct fscpos_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto exit;
        }
-       memset(data, 0, sizeof(struct fscpos_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);