diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 14:14:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 14:14:57 -0700 |
commit | 20731945ae743034353a88c307920d1f16cf8ac8 (patch) | |
tree | 132c796fe3a167dece8cec7a40b1d5dd83a68bc8 /drivers/hwmon/adm1021.c | |
parent | 406119f49d4a6cf8b6eee639128e0575a95065e3 (diff) | |
parent | a9d1b24d91f91b77db3da8aeacb414764f789b9c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'drivers/hwmon/adm1021.c')
-rw-r--r-- | drivers/hwmon/adm1021.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c index e928cdb041c..8102876c7c3 100644 --- a/drivers/hwmon/adm1021.c +++ b/drivers/hwmon/adm1021.c @@ -121,7 +121,7 @@ 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 */ @@ -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); |