]> err.no Git - linux-2.6/commitdiff
[PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11
authorLaurent Riffard <laurent.riffard@free.fr>
Sat, 26 Nov 2005 19:43:39 +0000 (20:43 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2006 06:16:23 +0000 (22:16 -0800)
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the drivers/media/video and usb/media drivers.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
44 files changed:
drivers/media/video/adv7170.c
drivers/media/video/adv7175.c
drivers/media/video/bt819.c
drivers/media/video/bt832.c
drivers/media/video/bt856.c
drivers/media/video/bttv-i2c.c
drivers/media/video/cs53l32a.c
drivers/media/video/cx25840/cx25840-core.c
drivers/media/video/cx25840/cx25840.h
drivers/media/video/cx88/cx88-i2c.c
drivers/media/video/indycam.c
drivers/media/video/ir-kbd-i2c.c
drivers/media/video/msp3400.c
drivers/media/video/ovcamchip/ovcamchip_core.c
drivers/media/video/saa5246a.c
drivers/media/video/saa5249.c
drivers/media/video/saa6588.c
drivers/media/video/saa7110.c
drivers/media/video/saa7111.c
drivers/media/video/saa7114.c
drivers/media/video/saa7115.c
drivers/media/video/saa711x.c
drivers/media/video/saa7127.c
drivers/media/video/saa7134/saa6752hs.c
drivers/media/video/saa7134/saa7134-i2c.c
drivers/media/video/saa7185.c
drivers/media/video/saa7191.c
drivers/media/video/tda7432.c
drivers/media/video/tda9840.c
drivers/media/video/tda9875.c
drivers/media/video/tda9887.c
drivers/media/video/tea6415c.c
drivers/media/video/tea6420.c
drivers/media/video/tuner-3036.c
drivers/media/video/tuner-core.c
drivers/media/video/tvaudio.c
drivers/media/video/tveeprom.c
drivers/media/video/tvmixer.c
drivers/media/video/tvp5150.c
drivers/media/video/vpx3220.c
drivers/media/video/wm8775.c
drivers/media/video/zoran_driver.c
drivers/usb/media/w9968cf.c
include/media/tuner.h

index 622b1619a7e334f86112674bb7d7de1c44052ee7..c5f1c6b681bdac0a8f8e1d147a1e7df07bc36ecb 100644 (file)
@@ -497,8 +497,10 @@ adv7170_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_adv7170 = {
-       .owner = THIS_MODULE,
-       .name = "adv7170",      /* name */
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "adv7170",      /* name */
+       },
 
        .id = I2C_DRIVERID_ADV7170,
 
index d4859b4457153e11beb1e700a90754c04e8ddce2..33158aa734d3993362f0ad5f219afbc9ac9ff45b 100644 (file)
@@ -547,8 +547,10 @@ adv7175_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_adv7175 = {
-       .owner = THIS_MODULE,
-       .name = "adv7175",      /* name */
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "adv7175",      /* name */
+       },
 
        .id = I2C_DRIVERID_ADV7175,
 
index 741e59af09919094bda003890aa38e6deaa2fe6f..5868bbb73a09ccdf806860e547d80179ea0e5650 100644 (file)
@@ -622,8 +622,10 @@ bt819_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_bt819 = {
-       .owner = THIS_MODULE,
-       .name = "bt819",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "bt819",
+       },
 
        .id = I2C_DRIVERID_BT819,
 
index 4ed13860b52362676e31e466510e38b7c334bc4a..347eb711fc0619e8b749c15619b65adc793de230 100644 (file)
@@ -230,8 +230,10 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-       .owner          = THIS_MODULE,
-       .name           = "i2c bt832 driver",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "i2c bt832 driver",
+       },
        .id             = -1, /* FIXME */
        .attach_adapter = bt832_probe,
        .detach_client  = bt832_detach,
index d4bba8efac69ff33a2949f059eded88162590ed7..207525aa156e3a685f4df78fbf074fc6bffa3130 100644 (file)
@@ -404,8 +404,10 @@ bt856_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_bt856 = {
-       .owner = THIS_MODULE,
-       .name = "bt856",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "bt856",
+       },
 
        .id = I2C_DRIVERID_BT856,
 
index 77619eb131f61e600e3164f317702c3406c1c3e5..d6418c023d39070e0c2a2bb47913e1a6518c73bc 100644 (file)
@@ -300,7 +300,7 @@ static int attach_inform(struct i2c_client *client)
 
        if (bttv_debug)
                printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n",
-                       btv->c.nr,client->driver->name,client->addr,
+                       btv->c.nr, client->driver->driver.name, client->addr,
                        client->name);
        if (!client->driver->command)
                return 0;
index f442ce3ba74b037345f5bbb10e2ac3402cce7f91..60484f9364899e09038fee738dac1ef53d293cdd 100644 (file)
@@ -42,15 +42,16 @@ MODULE_PARM_DESC(debug, "Debugging messages\n\t\t\t0=Off (default), 1=On");
 #define cs53l32a_dbg(fmt, arg...) \
        do { \
                if (debug) \
-                       printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
+                       printk(KERN_INFO "%s debug %d-%04x: " fmt, \
+                              client->driver->driver.name, \
                               i2c_adapter_id(client->adapter), client->addr , ## arg); \
        } while (0)
 
 #define cs53l32a_err(fmt, arg...) do { \
-       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \
                i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 #define cs53l32a_info(fmt, arg...) do { \
-       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \
                i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 
 static unsigned short normal_i2c[] = { 0x22 >> 1, I2C_CLIENT_END };
@@ -215,12 +216,14 @@ static int cs53l32a_detach(struct i2c_client *client)
 
 /* i2c implementation */
 static struct i2c_driver i2c_driver = {
-       .name = "cs53l32a",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "cs53l32a",
+       },
        .id = I2C_DRIVERID_CS53L32A,
        .attach_adapter = cs53l32a_probe,
        .detach_client = cs53l32a_detach,
        .command = cs53l32a_command,
-       .owner = THIS_MODULE,
 };
 
 
index 0b278abe879dbe796efcce644b13450d30b701b9..830d5195d1c0b30826e0d3479e5e0606e021fbea 100644 (file)
@@ -843,14 +843,16 @@ static int cx25840_detach_client(struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_cx25840 = {
-       .name = "cx25840",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "cx25840",
+       },
 
        .id = I2C_DRIVERID_CX25840,
 
        .attach_adapter = cx25840_attach_adapter,
        .detach_client = cx25840_detach_client,
        .command = cx25840_command,
-       .owner = THIS_MODULE,
 };
 
 
index 4932ed1c9b199bcd74fe381d0c48dee2366e3817..40aa59f9c52595b6142f8a1f2483d2347c8bb927 100644 (file)
 extern int cx25840_debug;
 
 #define cx25840_dbg(fmt, arg...) do { if (cx25840_debug) \
-       printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_INFO "%s debug %d-%04x: " fmt, \
+              client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 
 #define cx25840_err(fmt, arg...) do { \
-       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 
 #define cx25840_info(fmt, arg...) do { \
-       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 
 #define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0)
index 9790d412f1927041713c0a23e78f2f83317632ea..4a8fb161b16a935c205340ee85814c1c3991760b 100644 (file)
@@ -94,7 +94,7 @@ static int attach_inform(struct i2c_client *client)
        struct cx88_core *core = i2c_get_adapdata(client->adapter);
 
        dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
-               client->driver->name, client->addr, client->name);
+               client->driver->driver.name, client->addr, client->name);
        if (!client->driver->command)
                return 0;
 
index 3eba514cdb29fccef17cbc560f1352b7ce4cb422..96a808e8b2cab32bef7e4cb103cd762a861aa849 100644 (file)
@@ -451,8 +451,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 = {
+               .owner  = THIS_MODULE,
+               .name   = "indycam",
+       },
        .id             = I2C_DRIVERID_INDYCAM,
        .attach_adapter = indycam_probe,
        .detach_client  = indycam_detach,
index 2e2f78a4afc8b2340982535dd4494c328e7df75d..82c7f5042659b06851ae598d7a25b09b8ae53a05 100644 (file)
@@ -278,7 +278,10 @@ static int ir_detach(struct i2c_client *client);
 static int ir_probe(struct i2c_adapter *adap);
 
 static struct i2c_driver driver = {
-       .name           = "ir remote kbd driver",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "ir remote kbd driver",
+       },
        .id             = I2C_DRIVERID_INFRARED,
        .attach_adapter = ir_probe,
        .detach_client  = ir_detach,
index c5e8ad3aac4adee5b9477f6e10f7edf90e159548..3847d890d632c65ee7826d08e4e668c4aa124abf 100644 (file)
@@ -59,7 +59,8 @@
 #define msp3400_dbg(fmt, arg...) \
        do { \
                if (debug) \
-                       printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
+                       printk(KERN_INFO "%s debug %d-%04x: " fmt, \
+                              client->driver->driver.name, \
                               i2c_adapter_id(client->adapter), client->addr , ## arg); \
        } while (0)
 
@@ -67,7 +68,8 @@
 #define msp3400_dbg_mediumvol(fmt, arg...) \
        do { \
                if (debug >= 2) \
-                       printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
+                       printk(KERN_INFO "%s debug %d-%04x: " fmt, \
+                               client->driver->driver.name, \
                                i2c_adapter_id(client->adapter), client->addr , ## arg); \
        } while (0)
 
 #define msp3400_dbg_highvol(fmt, arg...) \
        do { \
                if (debug >= 16) \
-                       printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
+                       printk(KERN_INFO "%s debug %d-%04x: " fmt, \
+                               client->driver->driver.name, \
                                i2c_adapter_id(client->adapter), client->addr , ## arg); \
        } while (0)
 
 #define msp3400_err(fmt, arg...) do { \
-       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \
                i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 #define msp3400_warn(fmt, arg...) do { \
-       printk(KERN_WARNING "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_WARNING "%s %d-%04x: " fmt, client->driver->driver.name, \
                i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 #define msp3400_info(fmt, arg...) do { \
-       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \
                i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 
 #define OPMODE_AUTO    -1
@@ -1561,13 +1564,13 @@ static int msp_resume(struct device * dev);
 static void msp_wake_thread(struct i2c_client *client);
 
 static struct i2c_driver driver = {
-       .owner          = THIS_MODULE,
-       .name           = "msp3400",
        .id             = I2C_DRIVERID_MSP3400,
        .attach_adapter = msp_probe,
        .detach_client  = msp_detach,
        .command        = msp_command,
        .driver = {
+               .owner   = THIS_MODULE,
+               .name    = "i2c msp3400 driver",
                .suspend = msp_suspend,
                .resume  = msp_resume,
        },
index 390d0d6c78389cb215044ae94cf0a41cac05d90e..9ac398b2d915877cc13e67b01647bc249a105ca5 100644 (file)
@@ -410,8 +410,10 @@ static int ovcamchip_command(struct i2c_client *c, unsigned int cmd, void *arg)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-       .owner =                THIS_MODULE,
-       .name =                 "ovcamchip",
+       .driver = {
+               .owner =        THIS_MODULE,
+               .name =         "ovcamchip",
+       },
        .id =                   I2C_DRIVERID_OVCAMCHIP,
        .class =                I2C_CLASS_CAM_DIGITAL,
        .attach_adapter =       ovcamchip_attach,
index 9bf686989aabf815e48f5e6360713f869e500908..8c99edbe184355899524c3e6adc9beb0239d551b 100644 (file)
@@ -163,8 +163,10 @@ static int saa5246a_command(struct i2c_client *device, unsigned int cmd,
 
 static struct i2c_driver i2c_driver_videotext =
 {
-       .owner          = THIS_MODULE,
-       .name           = IF_NAME,              /* name */
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = IF_NAME,              /* name */
+       },
        .id             = I2C_DRIVERID_SAA5249, /* in i2c.h */
        .attach_adapter = saa5246a_probe,
        .detach_client  = saa5246a_detach,
index 811e863960303dc43bce173e5685019bfaa7ad51..5b346bdb1d597db0e32d8854783879e360ff074a 100644 (file)
@@ -236,8 +236,10 @@ static int saa5249_command(struct i2c_client *device,
 
 static struct i2c_driver i2c_driver_videotext = 
 {
-       .owner          = THIS_MODULE,
-       .name           = IF_NAME,              /* name */
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = IF_NAME,              /* name */
+       },
        .id             = I2C_DRIVERID_SAA5249, /* in i2c.h */
        .attach_adapter = saa5249_probe,
        .detach_client  = saa5249_detach,
index 3d4076ca67c3ce97160b5480cfdcfbcfacbf0f64..5ea36ee33b989baccf2255f443060ff8c9ebf85d 100644 (file)
@@ -495,8 +495,10 @@ static int saa6588_command(struct i2c_client *client, unsigned int cmd,
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-       .owner = THIS_MODULE,
-       .name = "i2c saa6588 driver",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "i2c saa6588 driver",
+       },
        .id = -1,               /* FIXME */
        .attach_adapter = saa6588_probe,
        .detach_client = saa6588_detach,
index 8affa63c8b244d4f9eae8811589aeab1ab5addf1..58f60baa27e917436256fa0c70b3faf633b9d722 100644 (file)
@@ -586,8 +586,10 @@ saa7110_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_saa7110 = {
-       .owner = THIS_MODULE,
-       .name = "saa7110",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "saa7110",
+       },
 
        .id = I2C_DRIVERID_SAA7110,
 
index 2b2204564514ca80d5bc64db70332f46697075e4..946eb74db37457a17d08f7c0257c95c792be7dfd 100644 (file)
@@ -589,8 +589,10 @@ saa7111_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_saa7111 = {
-       .owner = THIS_MODULE,
-       .name = "saa7111",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "saa7111",
+       },
 
        .id = I2C_DRIVERID_SAA7111A,
 
index 285f6c7a8f718f04cfc1eb0f4f93e83cd5f326f1..df53b58a9dbcbfa7ca4a10f755ed8ff212bbc19b 100644 (file)
@@ -1203,8 +1203,10 @@ saa7114_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_saa7114 = {
-       .owner = THIS_MODULE,
-       .name = "saa7114",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "saa7114",
+       },
 
        .id = I2C_DRIVERID_SAA7114,
 
index 79aadd2d408fc0e9becbdba10ee73ad9c8cbe438..6ac1ab4c9809b575cf97426d02be746fda23c969 100644 (file)
@@ -52,15 +52,16 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
 #define saa7115_dbg(fmt,arg...) \
        do { \
                if (debug) \
-                       printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
+                       printk(KERN_INFO "%s debug %d-%04x: " fmt, \
+                              client->driver->driver.name, \
                               i2c_adapter_id(client->adapter), client->addr , ## arg); \
        } while (0)
 
 #define saa7115_err(fmt, arg...) do { \
-       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 #define saa7115_info(fmt, arg...) do { \
-       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 
 static unsigned short normal_i2c[] = { 0x42 >> 1, 0x40 >> 1, I2C_CLIENT_END };
@@ -1353,12 +1354,14 @@ static int saa7115_detach(struct i2c_client *client)
 
 /* i2c implementation */
 static struct i2c_driver i2c_driver_saa7115 = {
-       .name = "saa7115",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "saa7115",
+       },
        .id = I2C_DRIVERID_SAA711X,
        .attach_adapter = saa7115_probe,
        .detach_client = saa7115_detach,
        .command = saa7115_command,
-       .owner = THIS_MODULE,
 };
 
 
index 44bfc047704c33b3c3a6ff10e5fd0774d500db63..3f7cfb7e46eb9e0aa09090bcfc2b5f73833afc61 100644 (file)
@@ -564,8 +564,10 @@ saa711x_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_saa711x = {
-       .owner = THIS_MODULE,
-       .name = "saa711x",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "saa711x",
+       },
 
        .id = I2C_DRIVERID_SAA711X,
 
index 1f4b415994457dd08bb4349fa782e423b1658256..659cb8a0b21cab35eab949d84a2ba4439a148b38 100644 (file)
@@ -69,7 +69,8 @@ MODULE_PARM_DESC(test_image, "test_image (0-1)");
 #define saa7127_dbg(fmt, arg...) \
        do { \
                if (debug >= 1) \
-                       printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
+                       printk(KERN_INFO "%s debug %d-%04x: " fmt, \
+                              client->driver->driver.name, \
                               i2c_adapter_id(client->adapter), client->addr , ## arg); \
        } while (0)
 
@@ -77,15 +78,16 @@ MODULE_PARM_DESC(test_image, "test_image (0-1)");
 #define saa7127_dbg_highvol(fmt, arg...) \
        do { \
                if (debug == 2) \
-                       printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
+                       printk(KERN_INFO "%s debug %d-%04x: " fmt, \
+                              client->driver->driver.name, \
                               i2c_adapter_id(client->adapter), client->addr , ## arg); \
        } while (0)
 
 #define saa7127_err(fmt, arg...) do { \
-       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 #define saa7127_info(fmt, arg...) do { \
-       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 
 static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END };
@@ -818,12 +820,14 @@ static int saa7127_detach(struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_saa7127 = {
-       .name = "saa7127",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "saa7127",
+       },
        .id = I2C_DRIVERID_SAA7127,
        .attach_adapter = saa7127_probe,
        .detach_client = saa7127_detach,
        .command = saa7127_command,
-       .owner = THIS_MODULE,
 };
 
 
index 68206060c92dce0d4ed11aeddb6cdc3f97c10989..0e8c9ed62b139bc03fcb4272901282ab26790102 100644 (file)
@@ -597,8 +597,10 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-       .owner          = THIS_MODULE,
-       .name           = "i2c saa6752hs MPEG encoder",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "i2c saa6752hs MPEG encoder",
+       },
        .id             = I2C_DRIVERID_SAA6752HS,
        .attach_adapter = saa6752hs_probe,
        .detach_client  = saa6752hs_detach,
index df9dd36721e0a633a56122c89f5471d8dda6599e..1792d03d621d44596b0b75b7a5c149a6f0250b4c 100644 (file)
@@ -333,7 +333,7 @@ static int attach_inform(struct i2c_client *client)
        struct tuner_setup tun_setup;
 
        d1printk( "%s i2c attach [addr=0x%x,client=%s]\n",
-               client->driver->name, client->addr, client->name);
+               client->driver->driver.name, client->addr, client->name);
 
        /* Am I an i2c remote control? */
 
@@ -343,7 +343,7 @@ static int attach_inform(struct i2c_client *client)
                {
                        struct IR_i2c *ir = i2c_get_clientdata(client);
                        d1printk("%s i2c IR detected (%s).\n",
-                                client->driver->name,ir->phys);
+                                client->driver->driver.name, ir->phys);
                        saa7134_set_i2c_ir(dev,ir);
                        break;
                }
index 9f37585d3f7385c6db9b5e998850e2c40f538c12..64047d77388cc60403ceb19ab00850337704e7af 100644 (file)
@@ -486,8 +486,10 @@ saa7185_detach_client (struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_saa7185 = {
-       .owner = THIS_MODULE,
-       .name = "saa7185",      /* name */
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "saa7185",      /* name */
+       },
 
        .id = I2C_DRIVERID_SAA7185B,
 
index 6be98fc0fe24ed708f224f8c52446f7164bdc34d..a0f8eaf251ef1eeb57bdefedd119cfdb05847dc9 100644 (file)
@@ -788,8 +788,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 = {
+               .owner  = THIS_MODULE,
+               .name   = "saa7191",
+       },
        .id             = I2C_DRIVERID_SAA7191,
        .attach_adapter = saa7191_probe,
        .detach_client  = saa7191_detach,
index 239a58666a1219957168b3dd5ef496fb5dacf0fd..59674d928ff7ca10f0841667b19b038bb616ae74 100644 (file)
@@ -501,8 +501,10 @@ static int tda7432_command(struct i2c_client *client,
 }
 
 static struct i2c_driver driver = {
-       .owner           = THIS_MODULE,
-       .name            = "i2c tda7432 driver",
+       .driver = {
+               .owner   = THIS_MODULE,
+               .name    = "i2c tda7432 driver",
+       },
        .id              = I2C_DRIVERID_TDA7432,
        .attach_adapter  = tda7432_probe,
        .detach_client   = tda7432_detach,
index f29fb507075daeb812296bf296f618785be537d5..8efc726874fc45d6c6073b839b9ca986f7cb229a 100644 (file)
@@ -221,8 +221,10 @@ static int detach(struct i2c_client *client)
 }
 
 static struct i2c_driver driver = {
-       .owner  = THIS_MODULE,
-       .name   = "tda9840",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "tda9840",
+       },
        .id     = I2C_DRIVERID_TDA9840,
        .attach_adapter = attach,
        .detach_client  = detach,
index d053b6445502761766ca0f5b3895b92649263ec5..de896167029ead9a8dfb3aba41780121e0848a2f 100644 (file)
@@ -372,8 +372,10 @@ static int tda9875_command(struct i2c_client *client,
 
 
 static struct i2c_driver driver = {
-       .owner          = THIS_MODULE,
-       .name           = "i2c tda9875 driver",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "i2c tda9875 driver",
+       },
        .id             = I2C_DRIVERID_TDA9875,
        .attach_adapter = tda9875_probe,
        .detach_client  = tda9875_detach,
index 324f61bf714e3eaf43eb159e7909073a5dd01c91..081f478051581c046f9074a1c98ebcdf2756d0ac 100644 (file)
@@ -819,13 +819,13 @@ static int tda9887_resume(struct device * dev)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-       .owner          = THIS_MODULE,
-       .name           = "i2c tda9887 driver",
        .id             = -1, /* FIXME */
        .attach_adapter = tda9887_probe,
        .detach_client  = tda9887_detach,
        .command        = tda9887_command,
        .driver = {
+               .owner   = THIS_MODULE,
+               .name    = "i2c tda9887 driver",
                .suspend = tda9887_suspend,
                .resume  = tda9887_resume,
        },
index 96d88ce60c984f9c9eeeb301f2f0134848aabbee..e7e2213c39e1d374d4f3f196ace8dc6d913a9334 100644 (file)
@@ -190,8 +190,10 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
 }
 
 static struct i2c_driver driver = {
-       .owner  = THIS_MODULE,
-       .name   = "tea6415c",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "tea6415c",
+       },
        .id     = I2C_DRIVERID_TEA6415C,
        .attach_adapter = attach,
        .detach_client  = detach,
index fd417de95847d2f54e2c280bf0be9a70b8c7b18c..74cc25f04056568ec223a2478f6e1bd09908690c 100644 (file)
@@ -167,8 +167,10 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
 }
 
 static struct i2c_driver driver = {
-       .owner  = THIS_MODULE,
-       .name   = "tea6420",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "tea6420",
+       },
        .id     = I2C_DRIVERID_TEA6420,
        .attach_adapter = attach,
        .detach_client  = detach,
index 3505cec2e65a2bd508c00d60f198f4894909159e..83257af8db41e63546a13a0f4016addce140824d 100644 (file)
@@ -175,8 +175,10 @@ tuner_probe(struct i2c_adapter *adap)
 static struct i2c_driver 
 i2c_driver_tuner = 
 {
-       .owner          =       THIS_MODULE,
-       .name           =       "sab3036",
+       .driver = {
+               .owner  =       THIS_MODULE,
+               .name   =       "sab3036",
+       },
        .id             =       I2C_DRIVERID_SAB3036,
        .attach_adapter =       tuner_probe,
        .detach_client  =       tuner_detach,
index 6328f0954e70075de82d1b441a1949ca5fdb2f4f..e8c854948de96d9c7f7268b74527902ed30a47a6 100644 (file)
@@ -206,7 +206,7 @@ static void set_type(struct i2c_client *c, unsigned int type,
 
        set_freq(c, t->freq);
        tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
-                 c->adapter->name, c->driver->name, c->addr << 1, type,
+                 c->adapter->name, c->driver->driver.name, c->addr << 1, type,
                  t->mode_mask);
 }
 
@@ -742,13 +742,13 @@ static int tuner_resume(struct device *dev)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-       .owner = THIS_MODULE,
-       .name = "tuner",
        .id = I2C_DRIVERID_TUNER,
        .attach_adapter = tuner_probe,
        .detach_client = tuner_detach,
        .command = tuner_command,
        .driver = {
+                  .owner = THIS_MODULE,
+                  .name = "tuner",
                   .suspend = tuner_suspend,
                   .resume = tuner_resume,
                   },
index 4f1f339283e0a33ccc239077f7eb9cfa1552ecec..30bb2a3615e92d7a3456a4ee319da1982cfbec6a 100644 (file)
@@ -1702,8 +1702,10 @@ static int chip_command(struct i2c_client *client,
 
 
 static struct i2c_driver driver = {
-       .owner           = THIS_MODULE,
-       .name            = "generic i2c audio driver",
+       .driver = {
+               .owner   = THIS_MODULE,
+               .name    = "generic i2c audio driver",
+       },
        .id              = I2C_DRIVERID_TVAUDIO,
        .attach_adapter  = chip_probe,
        .detach_client   = chip_detach,
index d833b651073a077cf0d5016f573656c747bb06da..d8b5a178180930ba223d67149090fb0f6b71e3f2 100644 (file)
@@ -778,8 +778,10 @@ tveeprom_detach_client (struct i2c_client *client)
 }
 
 static struct i2c_driver i2c_driver_tveeprom = {
-       .owner          = THIS_MODULE,
-       .name           = "tveeprom",
+       .driver = {
+               .owner  = THIS_MODULE,
+               .name   = "tveeprom",
+       },
        .id             = I2C_DRIVERID_TVEEPROM,
        .attach_adapter = tveeprom_attach_adapter,
        .detach_client  = tveeprom_detach_client,
index 936e01d2c785b25e65b7d108b9e0b887940fce3f..5f4d01854767a47651f0f3f025be1292fd3781e8 100644 (file)
@@ -228,9 +228,13 @@ static int tvmixer_release(struct inode *inode, struct file *file)
 
 static struct i2c_driver driver = {
 #ifdef I2C_PEC
-       .owner           = THIS_MODULE,
-#endif
+       .driver = {
+               .owner   = THIS_MODULE,
+               .name    = "tv card mixer driver",
+       },
+#else
        .name            = "tv card mixer driver",
+#endif
        .id              = I2C_DRIVERID_TVMIXER,
        .detach_adapter  = tvmixer_adapters,
        .attach_adapter  = tvmixer_adapters,
index 3734554fc73b0ef3ca1f8e584f98c8ce4fe5e182..5eca71fa8cbd44e34837e79ee8e4c004378f7160 100644 (file)
@@ -800,8 +800,10 @@ static int tvp5150_detach_client(struct i2c_client *client)
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver driver = {
-       .owner = THIS_MODULE,
-       .name = "tvp5150",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "tvp5150",
+       },
 
        /* FIXME */
        .id = I2C_DRIVERID_SAA7110,
index 54bc888c3891d49e7e2d0a226a61ba5c44aab801..b85b5981fb8dc7d856c12aef8773d29b721acc30 100644 (file)
@@ -721,8 +721,10 @@ vpx3220_attach_adapter (struct i2c_adapter *adapter)
  */
 
 static struct i2c_driver vpx3220_i2c_driver = {
-       .owner = THIS_MODULE,
-       .name = "vpx3220",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "vpx3220",
+       },
 
        .id = I2C_DRIVERID_VPX3220,
 
index 527c2591749ad0598fdcaeb039cd9f994638a723..22875f1fa1ab163db38f49dff389482930464427 100644 (file)
@@ -40,10 +40,10 @@ MODULE_AUTHOR("Ulf Eklund, Hans Verkuil");
 MODULE_LICENSE("GPL");
 
 #define wm8775_err(fmt, arg...) do { \
-       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 #define wm8775_info(fmt, arg...) do { \
-       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \
+       printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \
               i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
 
 
@@ -232,14 +232,16 @@ static int wm8775_detach(struct i2c_client *client)
 
 /* i2c implementation */
 static struct i2c_driver i2c_driver = {
-       .name = "wm8775",
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "wm8775",
+       },
 
        .id = I2C_DRIVERID_WM8775,
 
        .attach_adapter = wm8775_probe,
        .detach_client = wm8775_detach,
        .command = wm8775_command,
-       .owner = THIS_MODULE,
 };
 
 
index 07bde9acd672cbac58f1973f0b4a3a1697d32907..4034f1b45366922bffe95a4f3005c298ee7510d9 100644 (file)
@@ -1311,7 +1311,7 @@ zoran_open (struct inode *inode,
                res = -ENODEV;
                goto open_unlock_and_return;
        }
-       if (!try_module_get(zr->decoder->driver->owner)) {
+       if (!try_module_get(zr->decoder->driver->driver.owner)) {
                dprintk(1,
                        KERN_ERR
                        "%s: failed to grab ownership of i2c decoder\n",
@@ -1321,13 +1321,13 @@ zoran_open (struct inode *inode,
                goto open_unlock_and_return;
        }
        if (zr->encoder &&
-           !try_module_get(zr->encoder->driver->owner)) {
+           !try_module_get(zr->encoder->driver->driver.owner)) {
                dprintk(1,
                        KERN_ERR
                        "%s: failed to grab ownership of i2c encoder\n",
                        ZR_DEVNAME(zr));
                res = -EIO;
-               module_put(zr->decoder->driver->owner);
+               module_put(zr->decoder->driver->driver.owner);
                module_put(THIS_MODULE);
                goto open_unlock_and_return;
        }
@@ -1393,9 +1393,9 @@ zoran_open (struct inode *inode,
 open_unlock_and_return:
        /* if we grabbed locks, release them accordingly */
        if (have_module_locks) {
-               module_put(zr->decoder->driver->owner);
+               module_put(zr->decoder->driver->driver.owner);
                if (zr->encoder) {
-                       module_put(zr->encoder->driver->owner);
+                       module_put(zr->encoder->driver->driver.owner);
                }
                module_put(THIS_MODULE);
        }
@@ -1461,9 +1461,9 @@ zoran_close (struct inode *inode,
        kfree(fh);
 
        /* release locks on the i2c modules */
-       module_put(zr->decoder->driver->owner);
+       module_put(zr->decoder->driver->driver.owner);
        if (zr->encoder) {
-                module_put(zr->encoder->driver->owner);
+                module_put(zr->encoder->driver->driver.owner);
        }
        module_put(THIS_MODULE);
 
index 04d69339c05442fe16d3af4d810271a3def209a7..3605a6f3067b0b7602fff8f4fac14402287d1c47 100644 (file)
@@ -1533,12 +1533,12 @@ static int w9968cf_i2c_attach_inform(struct i2c_client* client)
                }
        } else {
                DBG(4, "Rejected client [%s] with driver [%s]", 
-                   client->name, client->driver->name)
+                   client->name, client->driver->driver.name)
                return -EINVAL;
        }
 
        DBG(5, "I2C attach client [%s] with driver [%s]",
-           client->name, client->driver->name)
+           client->name, client->driver->driver.name)
 
        return 0;
 }
index faa0f8e3091bf623f97939d69a61efbdc5e5d466..b37cde6066929ea5481857462c2a919831800148 100644 (file)
@@ -218,14 +218,15 @@ extern int default_tuner_init(struct i2c_client *c);
 extern int tea5767_autodetection(struct i2c_client *c);
 
 #define tuner_warn(fmt, arg...) do {\
-       printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->name, \
+       printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \
                        t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
 #define tuner_info(fmt, arg...) do {\
-       printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->name, \
+       printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \
                        t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
 #define tuner_dbg(fmt, arg...) do {\
        if (tuner_debug) \
-               printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \
+               printk(KERN_DEBUG "%s %d-%04x: " fmt, \
+                       t->i2c.driver->driver.name, \
                        t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
 
 #endif /* __KERNEL__ */