diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 17:14:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 17:14:57 -0400 |
commit | 20731945ae743034353a88c307920d1f16cf8ac8 (patch) | |
tree | 132c796fe3a167dece8cec7a40b1d5dd83a68bc8 /drivers/i2c/chips/pcf8591.c | |
parent | 406119f49d4a6cf8b6eee639128e0575a95065e3 (diff) | |
parent | a9d1b24d91f91b77db3da8aeacb414764f789b9c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'drivers/i2c/chips/pcf8591.c')
-rw-r--r-- | drivers/i2c/chips/pcf8591.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/chips/pcf8591.c b/drivers/i2c/chips/pcf8591.c index 80f1df9a4500..ce420a67560b 100644 --- a/drivers/i2c/chips/pcf8591.c +++ b/drivers/i2c/chips/pcf8591.c | |||
@@ -166,7 +166,7 @@ static int pcf8591_attach_adapter(struct i2c_adapter *adapter) | |||
166 | } | 166 | } |
167 | 167 | ||
168 | /* This function is called by i2c_probe */ | 168 | /* This function is called by i2c_probe */ |
169 | int pcf8591_detect(struct i2c_adapter *adapter, int address, int kind) | 169 | static int pcf8591_detect(struct i2c_adapter *adapter, int address, int kind) |
170 | { | 170 | { |
171 | struct i2c_client *new_client; | 171 | struct i2c_client *new_client; |
172 | struct pcf8591_data *data; | 172 | struct pcf8591_data *data; |
@@ -178,11 +178,10 @@ int pcf8591_detect(struct i2c_adapter *adapter, int address, int kind) | |||
178 | 178 | ||
179 | /* OK. For now, we presume we have a valid client. We now create the | 179 | /* OK. For now, we presume we have a valid client. We now create the |
180 | client structure, even though we cannot fill it completely yet. */ | 180 | client structure, even though we cannot fill it completely yet. */ |
181 | if (!(data = kmalloc(sizeof(struct pcf8591_data), GFP_KERNEL))) { | 181 | if (!(data = kzalloc(sizeof(struct pcf8591_data), GFP_KERNEL))) { |
182 | err = -ENOMEM; | 182 | err = -ENOMEM; |
183 | goto exit; | 183 | goto exit; |
184 | } | 184 | } |
185 | memset(data, 0, sizeof(struct pcf8591_data)); | ||
186 | 185 | ||
187 | new_client = &data->client; | 186 | new_client = &data->client; |
188 | i2c_set_clientdata(new_client, data); | 187 | i2c_set_clientdata(new_client, data); |