aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/chips/pcf8574.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-28 18:48:57 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-28 18:48:57 -0400
commit596c96ba06e5d56e72451e02f93f4e15e17458df (patch)
tree78bc640acacb8faeb621c51296e99dbb0533a147 /drivers/i2c/chips/pcf8574.c
parentad18b0ea089928367185e13d11424aea91d4b41f (diff)
parent20731945ae743034353a88c307920d1f16cf8ac8 (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/i2c/chips/pcf8574.c')
-rw-r--r--drivers/i2c/chips/pcf8574.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/chips/pcf8574.c b/drivers/i2c/chips/pcf8574.c
index 6525743ff9f..c323c2de236 100644
--- a/drivers/i2c/chips/pcf8574.c
+++ b/drivers/i2c/chips/pcf8574.c
@@ -115,7 +115,7 @@ static int pcf8574_attach_adapter(struct i2c_adapter *adapter)
}
/* This function is called by i2c_probe */
-int pcf8574_detect(struct i2c_adapter *adapter, int address, int kind)
+static int pcf8574_detect(struct i2c_adapter *adapter, int address, int kind)
{
struct i2c_client *new_client;
struct pcf8574_data *data;
@@ -127,11 +127,10 @@ int pcf8574_detect(struct i2c_adapter *adapter, int address, int kind)
/* OK. For now, we presume we have a valid client. We now create the
client structure, even though we cannot fill it completely yet. */
- if (!(data = kmalloc(sizeof(struct pcf8574_data), GFP_KERNEL))) {
+ if (!(data = kzalloc(sizeof(struct pcf8574_data), GFP_KERNEL))) {
err = -ENOMEM;
goto exit;
}
- memset(data, 0, sizeof(struct pcf8574_data));
new_client = &data->client;
i2c_set_clientdata(new_client, data);