aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/ds1374.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/ds1374.c')
-rw-r--r--drivers/i2c/chips/ds1374.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/chips/ds1374.c b/drivers/i2c/chips/ds1374.c
index 0936327a946d..da488b735abf 100644
--- a/drivers/i2c/chips/ds1374.c
+++ b/drivers/i2c/chips/ds1374.c
@@ -167,7 +167,8 @@ static void ds1374_set_tlet(ulong arg)
167 167
168static ulong new_time; 168static ulong new_time;
169 169
170DECLARE_TASKLET_DISABLED(ds1374_tasklet, ds1374_set_tlet, (ulong) & new_time); 170static DECLARE_TASKLET_DISABLED(ds1374_tasklet, ds1374_set_tlet,
171 (ulong) & new_time);
171 172
172int ds1374_set_rtc_time(ulong nowtime) 173int ds1374_set_rtc_time(ulong nowtime)
173{ 174{
@@ -193,13 +194,11 @@ static int ds1374_probe(struct i2c_adapter *adap, int addr, int kind)
193 struct i2c_client *client; 194 struct i2c_client *client;
194 int rc; 195 int rc;
195 196
196 client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); 197 client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
197 if (!client) 198 if (!client)
198 return -ENOMEM; 199 return -ENOMEM;
199 200
200 memset(client, 0, sizeof(struct i2c_client));
201 strncpy(client->name, DS1374_DRV_NAME, I2C_NAME_SIZE); 201 strncpy(client->name, DS1374_DRV_NAME, I2C_NAME_SIZE);
202 client->flags = I2C_DF_NOTIFY;
203 client->addr = addr; 202 client->addr = addr;
204 client->adapter = adap; 203 client->adapter = adap;
205 client->driver = &ds1374_driver; 204 client->driver = &ds1374_driver;