]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/indycam.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6-omap-h63xx.git] / drivers / media / video / indycam.c
index deeef125eb92eca9499fac5f06a7b72f7108a8fc..84b9e4f2b3b3fcef7c25b2b60d88df30925d44f6 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>
@@ -289,18 +288,15 @@ static int indycam_attach(struct i2c_adapter *adap, int addr, int kind)
        printk(KERN_INFO "SGI IndyCam driver version %s\n",
               INDYCAM_MODULE_VERSION);
 
-       client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
+       client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
        if (!client)
                return -ENOMEM;
-       camera = kmalloc(sizeof(struct indycam), GFP_KERNEL);
+       camera = kzalloc(sizeof(struct indycam), GFP_KERNEL);
        if (!camera) {
                err = -ENOMEM;
                goto out_free_client;
        }
 
-       memset(client, 0, sizeof(struct i2c_client));
-       memset(camera, 0, sizeof(struct indycam));
-
        client->addr = addr;
        client->adapter = adap;
        client->driver = &i2c_driver_indycam;
@@ -330,7 +326,7 @@ static int indycam_attach(struct i2c_adapter *adap, int addr, int kind)
        // initialize
        err = indycam_write_block(client, 0, sizeof(initseq), (u8 *)&initseq);
        if (err) {
-               printk(KERN_ERR "IndyCam initalization failed\n");
+               printk(KERN_ERR "IndyCam initialization failed\n");
                err = -EIO;
                goto out_detach_client;
        }
@@ -451,10 +447,10 @@ static int indycam_command(struct i2c_client *client, unsigned int cmd,
 }
 
 static struct i2c_driver i2c_driver_indycam = {
-       .owner          = THIS_MODULE,
-       .name           = "indycam",
+       .driver = {
+               .name   = "indycam",
+       },
        .id             = I2C_DRIVERID_INDYCAM,
-       .flags          = I2C_DF_NOTIFY,
        .attach_adapter = indycam_probe,
        .detach_client  = indycam_detach,
        .command        = indycam_command,