diff options
Diffstat (limited to 'drivers/media/video/saa7191.c')
-rw-r--r-- | drivers/media/video/saa7191.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/saa7191.c b/drivers/media/video/saa7191.c index cbca896e8cfa..746cadb8f1c4 100644 --- a/drivers/media/video/saa7191.c +++ b/drivers/media/video/saa7191.c @@ -571,18 +571,15 @@ static int saa7191_attach(struct i2c_adapter *adap, int addr, int kind) printk(KERN_INFO "Philips SAA7191 driver version %s\n", SAA7191_MODULE_VERSION); - client = kmalloc(sizeof(*client), GFP_KERNEL); + client = kzalloc(sizeof(*client), GFP_KERNEL); if (!client) return -ENOMEM; - decoder = kmalloc(sizeof(*decoder), GFP_KERNEL); + decoder = kzalloc(sizeof(*decoder), GFP_KERNEL); if (!decoder) { err = -ENOMEM; goto out_free_client; } - memset(client, 0, sizeof(struct i2c_client)); - memset(decoder, 0, sizeof(struct saa7191)); - client->addr = addr; client->adapter = adap; client->driver = &i2c_driver_saa7191; @@ -788,10 +785,10 @@ static int saa7191_command(struct i2c_client *client, unsigned int cmd, } static struct i2c_driver i2c_driver_saa7191 = { - .owner = THIS_MODULE, - .name = "saa7191", + .driver = { + .name = "saa7191", + }, .id = I2C_DRIVERID_SAA7191, - .flags = I2C_DF_NOTIFY, .attach_adapter = saa7191_probe, .detach_client = saa7191_detach, .command = saa7191_command |