]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/adv7175.c
[PATCH] I2C: Drop unneeded i2c-dev.h includes
[linux-2.6-omap-h63xx.git] / drivers / media / video / adv7175.c
index f898b65863741162d6269cf062d625e51660d3be..6b17247adf871f1bf3702779f32d8eec06a36d25 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <linux/sched.h>
-#include <asm/segment.h>
 #include <linux/types.h>
 
 #include <linux/videodev.h>
@@ -50,7 +49,6 @@ MODULE_AUTHOR("Dave Perks");
 MODULE_LICENSE("GPL");
 
 #include <linux/i2c.h>
-#include <linux/i2c-dev.h>
 
 #define I2C_NAME(s) (s)->name
 
@@ -441,7 +439,6 @@ static struct i2c_client_address_data addr_data = {
        .normal_i2c             = normal_i2c,
        .probe                  = &ignore,
        .ignore                 = &ignore,
-       .force                  = &ignore,
 };
 
 static struct i2c_driver i2c_driver_adv7175;
@@ -465,14 +462,12 @@ adv7175_detect_client (struct i2c_adapter *adapter,
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
                return 0;
 
-       client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
+       client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
        if (client == 0)
                return -ENOMEM;
-       memset(client, 0, sizeof(struct i2c_client));
        client->addr = address;
        client->adapter = adapter;
        client->driver = &i2c_driver_adv7175;
-       client->flags = I2C_CLIENT_ALLOW_USE;
        if ((client->addr == I2C_ADV7175 >> 1) ||
            (client->addr == (I2C_ADV7175 >> 1) + 1)) {
                dname = adv7175_name;
@@ -486,12 +481,11 @@ adv7175_detect_client (struct i2c_adapter *adapter,
        }
        strlcpy(I2C_NAME(client), dname, sizeof(I2C_NAME(client)));
 
-       encoder = kmalloc(sizeof(struct adv7175), GFP_KERNEL);
+       encoder = kzalloc(sizeof(struct adv7175), GFP_KERNEL);
        if (encoder == NULL) {
                kfree(client);
                return -ENOMEM;
        }
-       memset(encoder, 0, sizeof(struct adv7175));
        encoder->norm = VIDEO_MODE_PAL;
        encoder->input = 0;
        encoder->enable = 1;
@@ -550,11 +544,11 @@ adv7175_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_adv7175 = {
-       .owner = THIS_MODULE,
-       .name = "adv7175",      /* name */
+       .driver = {
+               .name = "adv7175",      /* name */
+       },
 
        .id = I2C_DRIVERID_ADV7175,
-       .flags = I2C_DF_NOTIFY,
 
        .attach_adapter = adv7175_attach_adapter,
        .detach_client = adv7175_detach_client,