diff options
Diffstat (limited to 'drivers/media/video/saa5249.c')
-rw-r--r-- | drivers/media/video/saa5249.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 7ffa2e9a9bf..5694eb58c3a 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c @@ -151,13 +151,12 @@ static int saa5249_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); @@ -165,7 +164,7 @@ static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind) * Now create a video4linux device */ - vd = (struct video_device *)kmalloc(sizeof(struct video_device), GFP_KERNEL); + vd = kmalloc(sizeof(struct video_device), GFP_KERNEL); if(vd==NULL) { kfree(t); @@ -226,23 +225,16 @@ static int saa5249_detach(struct i2c_client *client) return 0; } -static int saa5249_command(struct i2c_client *device, - unsigned int cmd, void *arg) -{ - return -EINVAL; -} - /* new I2C driver support */ 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 = saa5249_probe, .detach_client = saa5249_detach, - .command = saa5249_command }; static struct i2c_client client_template = { @@ -709,6 +701,7 @@ static struct file_operations saa_fops = { .open = saa5249_open, .release = saa5249_release, .ioctl = saa5249_ioctl, + .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, }; |