]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/saa7191.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / video / saa7191.c
index cbca896e8cfaa81dfcfaaa39fa665527a040b8ba..8615a6081a5d2eeae75143c4b6b1a93444807854 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/major.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/sched.h>
 #include <linux/slab.h>
 
 #include <linux/videodev.h>
@@ -571,18 +570,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 +784,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