[SCSI] fusion - mpi header udpate
[safe/jmp/linux-2.6] / drivers / i2c / chips / pcf8574.c
index 6525743..c3e6449 100644 (file)
@@ -65,10 +65,10 @@ static void pcf8574_init_client(struct i2c_client *client);
 
 /* This is the driver that will be inserted */
 static struct i2c_driver pcf8574_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "pcf8574",
+       .driver = {
+               .name   = "pcf8574",
+       },
        .id             = I2C_DRIVERID_PCF8574,
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = pcf8574_attach_adapter,
        .detach_client  = pcf8574_detach_client,
 };
@@ -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);