summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/rtc8564.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/rtc8564.c')
-rw-r--r--drivers/i2c/chips/rtc8564.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/chips/rtc8564.c b/drivers/i2c/chips/rtc8564.c
index 0b5385c892b1..916cdc1af23c 100644
--- a/drivers/i2c/chips/rtc8564.c
+++ b/drivers/i2c/chips/rtc8564.c
@@ -148,17 +148,16 @@ static int rtc8564_attach(struct i2c_adapter *adap, int addr, int kind)
{addr, I2C_M_RD, 2, data}
};
- d = kmalloc(sizeof(struct rtc8564_data), GFP_KERNEL);
+ d = kzalloc(sizeof(struct rtc8564_data), GFP_KERNEL);
if (!d) {
ret = -ENOMEM;
goto done;
}
- memset(d, 0, sizeof(struct rtc8564_data));
new_client = &d->client;
strlcpy(new_client->name, "RTC8564", I2C_NAME_SIZE);
i2c_set_clientdata(new_client, d);
- new_client->flags = I2C_CLIENT_ALLOW_USE | I2C_DF_NOTIFY;
+ new_client->flags = I2C_CLIENT_ALLOW_USE;
new_client->addr = addr;
new_client->adapter = adap;
new_client->driver = &rtc8564_driver;
OpenPOWER on IntegriCloud