linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / media / video / saa5246a.c
index ba69f09..2ce0102 100644 (file)
@@ -64,7 +64,6 @@ static struct video_device saa_template;      /* Declared near bottom */
 
 /* Addresses to scan */
 static unsigned short normal_i2c[]      = { I2C_ADDRESS, I2C_CLIENT_END };
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
 I2C_CLIENT_INSMOD;
 
 static struct i2c_client client_template;
@@ -84,13 +83,12 @@ static int saa5246a_attach(struct i2c_adapter *adap, int addr, int kind)
        client_template.adapter = adap;
        client_template.addr = addr;
        memcpy(client, &client_template, sizeof(*client));
-       t = kmalloc(sizeof(*t), GFP_KERNEL);
+       t = kzalloc(sizeof(*t), GFP_KERNEL);
        if(t==NULL)
        {
                kfree(client);
                return -ENOMEM;
        }
-       memset(t, 0, sizeof(*t));
        strlcpy(client->name, IF_NAME, I2C_NAME_SIZE);
        init_MUTEX(&t->lock);
 
@@ -152,25 +150,18 @@ static int saa5246a_detach(struct i2c_client *client)
        return 0;
 }
 
-static int saa5246a_command(struct i2c_client *device, unsigned int cmd,
-       void *arg)
-{
-       return -EINVAL;
-}
-
 /*
  *     I2C interfaces
  */
 
 static struct i2c_driver i2c_driver_videotext =
 {
-       .owner          = THIS_MODULE,
-       .name           = IF_NAME,              /* name */
+       .driver = {
+               .name   = IF_NAME,              /* name */
+       },
        .id             = I2C_DRIVERID_SAA5249, /* in i2c.h */
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = saa5246a_probe,
        .detach_client  = saa5246a_detach,
-       .command        = saa5246a_command
 };
 
 static struct i2c_client client_template = {