]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/adm1021.c
MIPS: R2: Fix local_irq_save()
[linux-2.6-omap-h63xx.git] / drivers / hwmon / adm1021.c
index e928cdb041cba28d76f23821172becc7c3589397..665612729cb9b15a2bebaa1cd0f3e5ecaa71363c 100644 (file)
@@ -121,15 +121,15 @@ static int adm1021_write_value(struct i2c_client *client, u8 reg,
 static struct adm1021_data *adm1021_update_device(struct device *dev);
 
 /* (amalysh) read only mode, otherwise any limit's writing confuse BIOS */
-static int read_only = 0;
+static int read_only;
 
 
 /* This is the driver that will be inserted */
 static struct i2c_driver adm1021_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "adm1021",
+       .driver = {
+               .name   = "adm1021",
+       },
        .id             = I2C_DRIVERID_ADM1021,
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = adm1021_attach_adapter,
        .detach_client  = adm1021_detach_client,
 };
@@ -204,11 +204,10 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
           client structure, even though we cannot fill it completely yet.
           But it allows us to access adm1021_{read,write}_value. */
 
-       if (!(data = kmalloc(sizeof(struct adm1021_data), GFP_KERNEL))) {
+       if (!(data = kzalloc(sizeof(struct adm1021_data), GFP_KERNEL))) {
                err = -ENOMEM;
                goto error0;
        }
-       memset(data, 0, sizeof(struct adm1021_data));
 
        new_client = &data->client;
        i2c_set_clientdata(new_client, data);