Skip to contentSkip to conversation

I2C: remove i2c_driver's .owner and .name

PATCH In review Laurent riffard 3 participants 6 messages Oct 24, 2005 – Nov 7, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 5/9 I2C: remove i2c_driver's .owner and .name

We should use the i2c_driver.driver's .name and .owner fields instead of the i2c_drivers's ones.

This patch updates the drivers/media/video files.

--

 drivers/media/video/adv7170.c                  |    6 ++++--
 drivers/media/video/adv7175.c                  |    6 ++++--
 drivers/media/video/bt819.c                    |    6 ++++--
 drivers/media/video/bt832.c                    |    6 ++++--
 drivers/media/video/bt856.c                    |    6 ++++--
 drivers/media/video/indycam.c                  |    6 ++++--
 drivers/media/video/ir-kbd-i2c.c               |    7 +++++--
 drivers/media/video/msp3400.c                  |   12 ++++++------
 drivers/media/video/ovcamchip/ovcamchip_core.c |    6 ++++--
 drivers/media/video/saa5246a.c                 |    6 ++++--
 drivers/media/video/saa5249.c                  |    6 ++++--
 drivers/media/video/saa6588.c                  |    6 ++++--
 drivers/media/video/saa7110.c                  |    6 ++++--
 drivers/media/video/saa7111.c                  |    6 ++++--
 drivers/media/video/saa7114.c                  |    6 ++++--
 drivers/media/video/saa7134/saa6752hs.c        |    6 ++++--
 drivers/media/video/saa7185.c                  |    6 ++++--
 drivers/media/video/saa7191.c                  |    6 ++++--
 drivers/media/video/tda7432.c                  |    6 ++++--
 drivers/media/video/tda9840.c                  |    6 ++++--
 drivers/media/video/tda9875.c                  |    6 ++++--
 drivers/media/video/tda9887.c                  |   12 ++++++------
 drivers/media/video/tea6415c.c                 |    6 ++++--
 drivers/media/video/tea6420.c                  |    6 ++++--
 drivers/media/video/tuner-3036.c               |    6 ++++--
 drivers/media/video/tuner-core.c               |   12 ++++++------
 drivers/media/video/tvaudio.c                  |    6 ++++--
 drivers/media/video/tveeprom.c                 |    6 ++++--
 drivers/media/video/tvmixer.c                  |    6 ++++--
 drivers/media/video/vpx3220.c                  |    6 ++++--
 30 files changed, 127 insertions(+), 72 deletions(-)

Index: linux-2.6-mm/drivers/media/video/adv7170.c =================================--- linux-2.6-mm.orig/drivers/media/video/adv7170.c +++ linux-2.6-mm/drivers/media/video/adv7170.c
@@ -498,8 +498,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver i2c_driver_adv7170 = {
- .owner = THIS_MODULE,
- .name = "adv7170", /* name */
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "adv7170", /* name */
+ },

.id = I2C_DRIVERID_ADV7170,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/adv7175.c =================================--- linux-2.6-mm.orig/drivers/media/video/adv7175.c +++ linux-2.6-mm/drivers/media/video/adv7175.c
@@ -548,8 +548,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver i2c_driver_adv7175 = {
- .owner = THIS_MODULE,
- .name = "adv7175", /* name */
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "adv7175", /* name */
+ },

.id = I2C_DRIVERID_ADV7175,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/bt819.c =================================--- linux-2.6-mm.orig/drivers/media/video/bt819.c +++ linux-2.6-mm/drivers/media/video/bt819.c
@@ -623,8 +623,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver i2c_driver_bt819 = {
- .owner = THIS_MODULE,
- .name = "bt819",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "bt819",
+ },

.id = I2C_DRIVERID_BT819,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/bt832.c =================================--- linux-2.6-mm.orig/drivers/media/video/bt832.c +++ linux-2.6-mm/drivers/media/video/bt832.c
@@ -231,8 +231,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "i2c bt832 driver",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "i2c bt832 driver",
+ },

         .id             = -1, /* FIXME */
         .flags          = I2C_DF_NOTIFY,
         .attach_adapter = bt832_probe,

Index: linux-2.6-mm/drivers/media/video/bt856.c =================================--- linux-2.6-mm.orig/drivers/media/video/bt856.c +++ linux-2.6-mm/drivers/media/video/bt856.c
@@ -405,8 +405,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver i2c_driver_bt856 = {
- .owner = THIS_MODULE,
- .name = "bt856",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "bt856",
+ },

.id = I2C_DRIVERID_BT856,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/indycam.c =================================--- linux-2.6-mm.orig/drivers/media/video/indycam.c +++ linux-2.6-mm/drivers/media/video/indycam.c
@@ -387,8 +387,10 @@
}

static struct i2c_driver i2c_driver_indycam = {
- .owner = THIS_MODULE,
- .name = "indycam",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "indycam",
+ },
.id = I2C_DRIVERID_INDYCAM,
.flags = I2C_DF_NOTIFY,
.attach_adapter = indycam_probe,
Index: linux-2.6-mm/drivers/media/video/ir-kbd-i2c.c =================================--- linux-2.6-mm.orig/drivers/media/video/ir-kbd-i2c.c +++ linux-2.6-mm/drivers/media/video/ir-kbd-i2c.c
@@ -297,8 +297,11 @@
static int ir_probe(struct i2c_adapter *adap);

static struct i2c_driver driver = {

-        .name           = "ir remote kbd driver",
-        .id             = I2C_DRIVERID_EXP3, /* FIXME */

+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "ir remote kbd driver",
+ },
+ .id = I2C_DRIVERID_EXP3, /* FIXME */
.flags = I2C_DF_NOTIFY,
.attach_adapter = ir_probe,
.detach_client = ir_detach,
Index: linux-2.6-mm/drivers/media/video/msp3400.c =================================--- linux-2.6-mm.orig/drivers/media/video/msp3400.c +++ linux-2.6-mm/drivers/media/video/msp3400.c
@@ -1426,17 +1426,17 @@
static void msp_wake_thread(struct i2c_client *client);

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "i2c msp3400 driver",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "i2c msp3400 driver",
+ .suspend = msp_suspend,
+ .resume = msp_resume,
+ },
.id = I2C_DRIVERID_MSP3400,
.flags = I2C_DF_NOTIFY,
.attach_adapter = msp_probe,
.detach_client = msp_detach,
.command = msp_command,
- .driver = {
- .suspend = msp_suspend,
- .resume = msp_resume,
- },
};

static struct i2c_client client_template Index: linux-2.6-mm/drivers/media/video/ovcamchip/ovcamchip_core.c
=================================--- linux-2.6-mm.orig/drivers/media/video/ovcamchip/ovcamchip_core.c +++ linux-2.6-mm/drivers/media/video/ovcamchip/ovcamchip_core.c
@@ -410,8 +410,10 @@
/* ----------------------------------------------------------------------- */

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,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/saa5246a.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa5246a.c +++ linux-2.6-mm/drivers/media/video/saa5246a.c
@@ -163,8 +163,10 @@

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 */
.flags = I2C_DF_NOTIFY,
.attach_adapter = saa5246a_probe,
Index: linux-2.6-mm/drivers/media/video/saa5249.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa5249.c +++ linux-2.6-mm/drivers/media/video/saa5249.c
@@ -236,8 +236,10 @@

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 */
.flags = I2C_DF_NOTIFY,
.attach_adapter = saa5249_probe,
Index: linux-2.6-mm/drivers/media/video/saa6588.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa6588.c +++ linux-2.6-mm/drivers/media/video/saa6588.c
@@ -497,8 +497,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "i2c saa6588 driver",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "i2c saa6588 driver",
+ },
.id = -1, /* FIXME */
.flags = I2C_DF_NOTIFY,
.attach_adapter = saa6588_probe,
Index: linux-2.6-mm/drivers/media/video/saa7110.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa7110.c +++ linux-2.6-mm/drivers/media/video/saa7110.c
@@ -587,8 +587,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver i2c_driver_saa7110 = {
- .owner = THIS_MODULE,
- .name = "saa7110",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "saa7110",
+ },

.id = I2C_DRIVERID_SAA7110,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/saa7111.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa7111.c +++ linux-2.6-mm/drivers/media/video/saa7111.c
@@ -590,8 +590,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver i2c_driver_saa7111 = {
- .owner = THIS_MODULE,
- .name = "saa7111",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "saa7111",
+ },

.id = I2C_DRIVERID_SAA7111A,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/saa7114.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa7114.c +++ linux-2.6-mm/drivers/media/video/saa7114.c
@@ -1204,8 +1204,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver i2c_driver_saa7114 = {
- .owner = THIS_MODULE,
- .name = "saa7114",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "saa7114",
+ },

.id = I2C_DRIVERID_SAA7114,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/saa7134/saa6752hs.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa7134/saa6752hs.c +++ linux-2.6-mm/drivers/media/video/saa7134/saa6752hs.c
@@ -587,8 +587,10 @@
/* ----------------------------------------------------------------------- */

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,
.flags = I2C_DF_NOTIFY,
.attach_adapter = saa6752hs_probe,
Index: linux-2.6-mm/drivers/media/video/saa7185.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa7185.c +++ linux-2.6-mm/drivers/media/video/saa7185.c
@@ -487,8 +487,10 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver i2c_driver_saa7185 = {
- .owner = THIS_MODULE,
- .name = "saa7185", /* name */
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "saa7185", /* name */
+ },

.id = I2C_DRIVERID_SAA7185B,
.flags = I2C_DF_NOTIFY,
Index: linux-2.6-mm/drivers/media/video/saa7191.c =================================--- linux-2.6-mm.orig/drivers/media/video/saa7191.c +++ linux-2.6-mm/drivers/media/video/saa7191.c
@@ -487,8 +487,10 @@
}

static struct i2c_driver i2c_driver_saa7191 = {
- .owner = THIS_MODULE,
- .name = "saa7191",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "saa7191",
+ },
.id = I2C_DRIVERID_SAA7191,
.flags = I2C_DF_NOTIFY,
.attach_adapter = saa7191_probe,
Index: linux-2.6-mm/drivers/media/video/tda7432.c =================================--- linux-2.6-mm.orig/drivers/media/video/tda7432.c +++ linux-2.6-mm/drivers/media/video/tda7432.c
@@ -502,8 +502,10 @@
}

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "i2c tda7432 driver",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "i2c tda7432 driver",
+ },
.id = I2C_DRIVERID_TDA7432,
.flags = I2C_DF_NOTIFY,
.attach_adapter = tda7432_probe,
Index: linux-2.6-mm/drivers/media/video/tda9840.c =================================--- linux-2.6-mm.orig/drivers/media/video/tda9840.c +++ linux-2.6-mm/drivers/media/video/tda9840.c
@@ -221,8 +221,10 @@
}

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "tda9840",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "tda9840",
+ },
.id = I2C_DRIVERID_TDA9840,
.flags = I2C_DF_NOTIFY,
.attach_adapter = attach,
Index: linux-2.6-mm/drivers/media/video/tda9875.c =================================--- linux-2.6-mm.orig/drivers/media/video/tda9875.c +++ linux-2.6-mm/drivers/media/video/tda9875.c
@@ -373,8 +373,10 @@

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "i2c tda9875 driver",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "i2c tda9875 driver",
+ },
.id = I2C_DRIVERID_TDA9875,
.flags = I2C_DF_NOTIFY,
.attach_adapter = tda9875_probe,
Index: linux-2.6-mm/drivers/media/video/tda9887.c =================================--- linux-2.6-mm.orig/drivers/media/video/tda9887.c +++ linux-2.6-mm/drivers/media/video/tda9887.c
@@ -803,17 +803,17 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "i2c tda9887 driver",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "i2c tda9887 driver",
+ .suspend = tda9887_suspend,
+ .resume = tda9887_resume,
+ },

         .id             = -1, /* FIXME */
         .flags          = I2C_DF_NOTIFY,
         .attach_adapter = tda9887_probe,
         .detach_client  = tda9887_detach,
         .command        = tda9887_command,

- .driver = {
- .suspend = tda9887_suspend,
- .resume = tda9887_resume,
- },
};
static struct i2c_client client_template {
Index: linux-2.6-mm/drivers/media/video/tea6415c.c =================================--- linux-2.6-mm.orig/drivers/media/video/tea6415c.c +++ linux-2.6-mm/drivers/media/video/tea6415c.c
@@ -190,8 +190,10 @@
}

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "tea6415c",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "tea6415c",
+ },
.id = I2C_DRIVERID_TEA6415C,
.flags = I2C_DF_NOTIFY,
.attach_adapter = attach,
Index: linux-2.6-mm/drivers/media/video/tea6420.c =================================--- linux-2.6-mm.orig/drivers/media/video/tea6420.c +++ linux-2.6-mm/drivers/media/video/tea6420.c
@@ -167,8 +167,10 @@
}

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "tea6420",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "tea6420",
+ },
.id = I2C_DRIVERID_TEA6420,
.flags = I2C_DF_NOTIFY,
.attach_adapter = attach,
Index: linux-2.6-mm/drivers/media/video/tuner-3036.c =================================--- linux-2.6-mm.orig/drivers/media/video/tuner-3036.c +++ linux-2.6-mm/drivers/media/video/tuner-3036.c
@@ -175,8 +175,10 @@
static struct i2c_driver
i2c_driver_tuner =
{
- .owner = THIS_MODULE,
- .name = "sab3036",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "sab3036",
+ },
.id = I2C_DRIVERID_SAB3036,

         .flags		=	I2C_DF_NOTIFY,

.attach_adapter = tuner_probe,
Index: linux-2.6-mm/drivers/media/video/tuner-core.c =================================--- linux-2.6-mm.orig/drivers/media/video/tuner-core.c +++ linux-2.6-mm/drivers/media/video/tuner-core.c
@@ -721,17 +721,17 @@
/* ----------------------------------------------------------------------- */

static struct i2c_driver driver = {
- .owner = THIS_MODULE,
- .name = "tuner",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "tuner",
+ .suspend = tuner_suspend,
+ .resume = tuner_resume,
+ },
.id = I2C_DRIVERID_TUNER,
.flags = I2C_DF_NOTIFY,
.attach_adapter = tuner_probe,
.detach_client = tuner_detach,
.command = tuner_command,
- .driver = {

-		   .suspend = tuner_suspend,
-		   .resume = tuner_resume,
-		   },

};
static struct i2c_client client_template = {
.name = "(tuner unset)",
Index: linux-2.6-mm/drivers/media/video/tvaudio.c =================================--- linux-2.6-mm.orig/drivers/media/video/tvaudio.c +++ linux-2.6-mm/drivers/media/video/tvaudio.c
@@ -1703,8 +1703,10 @@

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,
 	.flags           = I2C_DF_NOTIFY,
 	.attach_adapter  = chip_probe,

Index: linux-2.6-mm/drivers/media/video/tveeprom.c =================================--- linux-2.6-mm.orig/drivers/media/video/tveeprom.c +++ linux-2.6-mm/drivers/media/video/tveeprom.c
@@ -672,8 +672,10 @@
}

static struct i2c_driver i2c_driver_tveeprom = {
- .owner = THIS_MODULE,
- .name = "tveeprom",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "tveeprom",
+ },
.id = I2C_DRIVERID_TVEEPROM,
.flags = I2C_DF_NOTIFY,
.attach_adapter = tveeprom_attach_adapter,
Index: linux-2.6-mm/drivers/media/video/tvmixer.c =================================--- linux-2.6-mm.orig/drivers/media/video/tvmixer.c +++ linux-2.6-mm/drivers/media/video/tvmixer.c
@@ -227,10 +227,12 @@
}

static struct i2c_driver driver = {
+ .driver = {
#ifdef I2C_PEC
- .owner = THIS_MODULE,
+ .owner = THIS_MODULE,
#endif
- .name = "tv card mixer driver",
+ .name = "tv card mixer driver",
+ },
.id = I2C_DRIVERID_TVMIXER,
#ifdef I2C_DF_DUMMY
.flags = I2C_DF_DUMMY,
Index: linux-2.6-mm/drivers/media/video/vpx3220.c =================================--- linux-2.6-mm.orig/drivers/media/video/vpx3220.c +++ linux-2.6-mm/drivers/media/video/vpx3220.c
@@ -722,8 +722,10 @@
*/

static struct i2c_driver vpx3220_i2c_driver = {
- .owner = THIS_MODULE,
- .name = "vpx3220",
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "vpx3220",
+ },

.id = I2C_DRIVERID_VPX3220,
.flags = I2C_DF_NOTIFY,

--

#1 lore raw

[lm-sensors] Re: [patch 5/9] I2C: remove i2c_driver's .owner and

Hi Laurent,

Quoted 2 lines · Laurent Riffard

We should use the i2c_driver.driver's .name and .owner fields instead of the i2c_drivers's ones.

Looks overall good to me, except:

Quoted 4 lines

Index: linux-2.6-mm/drivers/media/video/ir-kbd-i2c.c =================================> --- linux-2.6-mm.orig/drivers/media/video/ir-kbd-i2c.c +++ linux-2.6-mm/drivers/media/video/ir-kbd-i2c.c

Review line 304

Quoted 10 lines
(quoted diff) +5 -2
@@ -297,8 +297,11 @@
 static int ir_probe(struct i2c_adapter *adap);
 
 static struct i2c_driver driver = {
-        .name           = "ir remote kbd driver",
-        .id             = I2C_DRIVERID_EXP3, /* FIXME */
+	.driver = {
+		.owner  = THIS_MODULE,
+		.name   = "ir remote kbd driver",
+	},
+	.id             = I2C_DRIVERID_EXP3, /* FIXME */

Whitespace change on .id, please revert.

Quoted 15 lines

Index: linux-2.6-mm/drivers/media/video/msp3400.c =================================> --- linux-2.6-mm.orig/drivers/media/video/msp3400.c +++ linux-2.6-mm/drivers/media/video/msp3400.c

(quoted diff) +6 -2
@@ -1426,17 +1426,17 @@
 static void msp_wake_thread(struct i2c_client *client);
 
 static struct i2c_driver driver = {
-	.owner          = THIS_MODULE,
-	.name           = "i2c msp3400 driver",
+	.driver = {
+		.owner   = THIS_MODULE,
+		.name    = "i2c msp3400 driver",
+		.suspend = msp_suspend,
+		.resume  = msp_resume,
+	},

Review line 1440

Quoted 10 lines
(quoted diff) +0 -4
         .id             = I2C_DRIVERID_MSP3400,
         .flags          = I2C_DF_NOTIFY,
         .attach_adapter = msp_probe,
         .detach_client  = msp_detach,
         .command        = msp_command,
-	.driver = {
-		.suspend = msp_suspend,
-		.resume  = msp_resume,
-	},
 };

Please minimize the changes. Leave .suspend and .resume where there are and move .owner and .name inside .driver, rather than the other way around. Same comment applies to tda9887.c and tuner-core.c.

Quoted 8 lines

Index: linux-2.6-mm/drivers/media/video/tvmixer.c =================================> --- linux-2.6-mm.orig/drivers/media/video/tvmixer.c +++ linux-2.6-mm/drivers/media/video/tvmixer.c

(quoted diff) +1 -0
@@ -227,10 +227,12 @@
 }
 
 static struct i2c_driver driver = {
+	.driver = {

Review line 238

Quoted 10 lines
(quoted diff) +3 -2
 #ifdef I2C_PEC
-	.owner           = THIS_MODULE,
+		.owner   = THIS_MODULE,
 #endif
-	.name            = "tv card mixer driver",
+		.name    = "tv card mixer driver",
+	},
         .id              = I2C_DRIVERID_TVMIXER,
 #ifdef I2C_DF_DUMMY
 	.flags           = I2C_DF_DUMMY,

This doesn't make much sense that way. #ifdef tests are supposed to guarantee a compatibility with Linux 2.4, which your change breaks. So, either make your changes such that compatibility is preserved:

static struct i2c_driver driver = {

#ifdef I2C_PEC
	.driver = {
		.owner   = THIS_MODULE,
		.name    = "tv card mixer driver",
	},

#else
.name = "tv card mixer driver",
#endif

or drop the compatibility stuff altogether (I would prefer that, but v4l folks may not agree), but don't leave it half broken.

Thanks,
--
Jean Delvare

#2 lore raw

[lm-sensors] Re: [patch 5/9] I2C: remove i2c_driver's .owner and

In reply to Laurent riffard

Le 25.10.2005 15:07, Jean Delvare a ?crit :

Quoted 18 lines

Hi Laurent,

Quoted 2 lines · Laurent Riffard

We should use the i2c_driver.driver's .name and .owner fields instead of the i2c_drivers's ones.

Looks overall good to me, except:

Quoted 6 lines

Index: linux-2.6-mm/drivers/media/video/ir-kbd-i2c.c =================================>>--- linux-2.6-mm.orig/drivers/media/video/ir-kbd-i2c.c +++ linux-2.6-mm/drivers/media/video/ir-kbd-i2c.c

(quoted diff) +0 -0
@@ -297,8 +297,11 @@
 static int ir_probe(struct i2c_adapter *adap);
 
Quoted 11 lines

Review line 304

Quoted 8 lines
(quoted diff) +5 -2
 static struct i2c_driver driver = {
-        .name           = "ir remote kbd driver",
-        .id             = I2C_DRIVERID_EXP3, /* FIXME */
+	.driver = {
+		.owner  = THIS_MODULE,
+		.name   = "ir remote kbd driver",
+	},
+	.id             = I2C_DRIVERID_EXP3, /* FIXME */

Whitespace change on .id, please revert.

oops !

Quoted 22 lines
Quoted 22 lines

Index: linux-2.6-mm/drivers/media/video/msp3400.c =================================>>--- linux-2.6-mm.orig/drivers/media/video/msp3400.c +++ linux-2.6-mm/drivers/media/video/msp3400.c

(quoted diff) +6 -4
@@ -1426,17 +1426,17 @@
 static void msp_wake_thread(struct i2c_client *client);
 
 static struct i2c_driver driver = {
-	.owner          = THIS_MODULE,
-	.name           = "i2c msp3400 driver",
+	.driver = {
+		.owner   = THIS_MODULE,
+		.name    = "i2c msp3400 driver",
+		.suspend = msp_suspend,
+		.resume  = msp_resume,
+	},
        .id             = I2C_DRIVERID_MSP3400,
        .flags          = I2C_DF_NOTIFY,
        .attach_adapter = msp_probe,
        .detach_client  = msp_detach,
        .command        = msp_command,
-	.driver = {
-		.suspend = msp_suspend,
Quoted 8 lines

Review line 1440

Quoted 3 lines
(quoted diff) +0 -2
-		.resume  = msp_resume,
-	},
 };

Please minimize the changes. Leave .suspend and .resume where there are and move .owner and .name inside .driver, rather than the other way around. Same comment applies to tda9887.c and tuner-core.c.

Ok.

Quoted 30 lines
Quoted 8 lines

Index: linux-2.6-mm/drivers/media/video/tvmixer.c =================================>>--- linux-2.6-mm.orig/drivers/media/video/tvmixer.c +++ linux-2.6-mm/drivers/media/video/tvmixer.c

(quoted diff) +1 -0
@@ -227,10 +227,12 @@
 }
 
 static struct i2c_driver driver = {
+	.driver = {

Review line 238

Quoted 10 lines
(quoted diff) +3 -2
 #ifdef I2C_PEC
-	.owner           = THIS_MODULE,
+		.owner   = THIS_MODULE,
 #endif
-	.name            = "tv card mixer driver",
+		.name    = "tv card mixer driver",
+	},
        .id              = I2C_DRIVERID_TVMIXER,
 #ifdef I2C_DF_DUMMY
 	.flags           = I2C_DF_DUMMY,

This doesn't make much sense that way. #ifdef tests are supposed to guarantee a compatibility with Linux 2.4, which your change breaks. So, either make your changes such that compatibility is preserved:

static struct i2c_driver driver = {

#ifdef I2C_PEC
	.driver = {
		.owner   = THIS_MODULE,
		.name    = "tv card mixer driver",
	},
Quoted 6 lines

#else
.name = "tv card mixer driver",
#endif

or drop the compatibility stuff altogether (I would prefer that, but v4l folks may not agree), but don't leave it half broken.

I have to admit that the meaning of this macro was not clear for me...

Quoted 3 lines

Thanks,
--
Jean Delvare

Thanks for your comments. Here is an updated version of the patch.

Signature · 9 lines
laurent

-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_i2c_driver_owner_media_video.patch
Type: text/x-patch
Size: 19170 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20051025/e7c2b1a7/remove_i2c_driver_owner_media_video-0001.bin
#3 lore raw

[lm-sensors] Re: [patch 5/9] I2C: remove i2c_driver's .owner and

In reply to Laurent riffard

Laurent,

We've included several new I2C drivers on V4L CVS tree, and I'm about
to send the newer patchset series to -mm. If you want to see it, these are early available at:

	http://linuxtv.org/download/video4linux/patches/2.6.14-rc5

	I still need some time to fix my patch scripts, since we had some

driver renaming and I don't want to send patches to add, then remove and add again with other name.

Basically, your patches should be go after the V4L patchsets, and
should also include some newer boards, like:

	em2820-i2c.c
	cs53l32a.c
	wm8775.c
	saa711x.c
	tvp5150.c

Em Ter, 2005-10-25 ?s 18:26 +0200, Laurent Riffard escreveu:

Quoted 114 lines

Le 25.10.2005 15:07, Jean Delvare a ?crit :

Quoted 18 lines

Hi Laurent,

Quoted 2 lines · Laurent Riffard

We should use the i2c_driver.driver's .name and .owner fields instead of the i2c_drivers's ones.

Looks overall good to me, except:

Quoted 6 lines

Index: linux-2.6-mm/drivers/media/video/ir-kbd-i2c.c =================================> >>--- linux-2.6-mm.orig/drivers/media/video/ir-kbd-i2c.c +++ linux-2.6-mm/drivers/media/video/ir-kbd-i2c.c

(quoted diff) +0 -0
@@ -297,8 +297,11 @@
 static int ir_probe(struct i2c_adapter *adap);
 
Quoted 11 lines

Review line 304

Quoted 8 lines
(quoted diff) +5 -2
 static struct i2c_driver driver = {
-        .name           = "ir remote kbd driver",
-        .id             = I2C_DRIVERID_EXP3, /* FIXME */
+	.driver = {
+		.owner  = THIS_MODULE,
+		.name   = "ir remote kbd driver",
+	},
+	.id             = I2C_DRIVERID_EXP3, /* FIXME */

Whitespace change on .id, please revert.

oops !

Quoted 22 lines
Quoted 22 lines

Index: linux-2.6-mm/drivers/media/video/msp3400.c =================================> >>--- linux-2.6-mm.orig/drivers/media/video/msp3400.c +++ linux-2.6-mm/drivers/media/video/msp3400.c

(quoted diff) +6 -4
@@ -1426,17 +1426,17 @@
 static void msp_wake_thread(struct i2c_client *client);
 
 static struct i2c_driver driver = {
-	.owner          = THIS_MODULE,
-	.name           = "i2c msp3400 driver",
+	.driver = {
+		.owner   = THIS_MODULE,
+		.name    = "i2c msp3400 driver",
+		.suspend = msp_suspend,
+		.resume  = msp_resume,
+	},
        .id             = I2C_DRIVERID_MSP3400,
        .flags          = I2C_DF_NOTIFY,
        .attach_adapter = msp_probe,
        .detach_client  = msp_detach,
        .command        = msp_command,
-	.driver = {
-		.suspend = msp_suspend,
Quoted 8 lines

Review line 1440

Quoted 3 lines
(quoted diff) +0 -2
-		.resume  = msp_resume,
-	},
 };

Please minimize the changes. Leave .suspend and .resume where there are and move .owner and .name inside .driver, rather than the other way around. Same comment applies to tda9887.c and tuner-core.c.

Ok.

Quoted 30 lines
Quoted 8 lines

Index: linux-2.6-mm/drivers/media/video/tvmixer.c =================================> >>--- linux-2.6-mm.orig/drivers/media/video/tvmixer.c +++ linux-2.6-mm/drivers/media/video/tvmixer.c

(quoted diff) +1 -0
@@ -227,10 +227,12 @@
 }
 
 static struct i2c_driver driver = {
+	.driver = {

Review line 238

Quoted 10 lines
(quoted diff) +3 -2
 #ifdef I2C_PEC
-	.owner           = THIS_MODULE,
+		.owner   = THIS_MODULE,
 #endif
-	.name            = "tv card mixer driver",
+		.name    = "tv card mixer driver",
+	},
        .id              = I2C_DRIVERID_TVMIXER,
 #ifdef I2C_DF_DUMMY
 	.flags           = I2C_DF_DUMMY,

This doesn't make much sense that way. #ifdef tests are supposed to guarantee a compatibility with Linux 2.4, which your change breaks. So, either make your changes such that compatibility is preserved:

static struct i2c_driver driver = {

#ifdef I2C_PEC
	.driver = {
		.owner   = THIS_MODULE,
		.name    = "tv card mixer driver",
	},
Quoted 6 lines

#else
.name = "tv card mixer driver",
#endif

or drop the compatibility stuff altogether (I would prefer that, but v4l folks may not agree), but don't leave it half broken.

I have to admit that the meaning of this macro was not clear for me...

Quoted 3 lines

Thanks,
--
Jean Delvare

Thanks for your comments. Here is an updated version of the patch. --
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

Signature · 11 lines
Mauro Carvalho Chehab <[email protected]>


	

	
		
_______________________________________________________ 
Promo??o Yahoo! Acesso Gr?tis: a cada hora navegada voc?
acumula cupons e concorre a mais de 500 pr?mios! Participe!
http://yahoo.fbiz.com.br/
#4 lore raw

[lm-sensors] Re: [patch 5/9] I2C: remove i2c_driver's .owner and

In reply to Laurent riffard

Hi Mauro,

Please don't forget to explicitely list Laurent in To: or CC:.

Quoted 4 lines

We've included several new I2C drivers on V4L CVS tree, and I'm about to send the newer patchset series to -mm. If you want to see it, these are early available at:
http://linuxtv.org/download/video4linux/patches/2.6.14-rc5

About this, I've noticed two issues with these patches:

v4l_635_add_bttv_card_137_conceptronic_ctvfmi_v2.patch Creates a bttv-cards.c.orig file.

v4l_801_whitespaces_cleanups.patch
Creates a tvaudio.c.orig file.

I would also suggest that you limit the length of the patch file names. v4l_716_from_markus_rechberger_mrechberger_gmail_com_ludovico_cavedon_cavedon_sssup_it_mauro_carvalho_chehab_mchehab_brturbo_com_br_.patch is a bit too long IMHO ;)

Quoted 7 lines

Basically, your patches should be go after the V4L patchsets, and should also include some newer boards, like:

	em2820-i2c.c
	cs53l32a.c
	wm8775.c
	saa711x.c
	tvp5150.c

No, it doesn't work that way. i2c patches are applied before the v4l patches in -mm, and I doubt Andrew is going to reorder patchsets every now and then. There simply are too many dependencies to deal with.

So, just send your v4l patches to Andrew when they're ready. I'll send my i2c patches (including Laurent's) when they are ready, with a note to Andrew on how to fix drivers which might break, and he'll deal with that just fine.

You shouldn't underestimate Andrew's ability to deal with conflicts of all sorts. He's damn good at it.

When either the i2c or v4l patches finally get merged into Linus' tree, the other one of us will have to update his patchset. That shouldn't be difficult either.

Thanks,

Signature · 1 line
Jean Delvare
#5 lore raw

[lm-sensors] Re: [patch 5/9] I2C: remove i2c_driver's .owner and

In reply to Laurent riffard

Hi, Jean,

Sorry for the late answer... I've suffered a bad filtering rule on this
account, and this went to a different folder... Only today I noticed and fixed the rule.

Em Qui, 2005-10-27 ?s 22:40 +0200, Jean Delvare escreveu:

Quoted 3 lines

Hi Mauro,

Please don't forget to explicitely list Laurent in To: or CC:.

Ok, I will at the next patches.

Quoted 6 lines
Quoted 5 lines

We've included several new I2C drivers on V4L CVS tree, and I'm about to send the newer patchset series to -mm. If you want to see it, these are early available at:
http://linuxtv.org/download/video4linux/patches/2.6.14-rc5

Quoted 7 lines

About this, I've noticed two issues with these patches:

v4l_635_add_bttv_card_137_conceptronic_ctvfmi_v2.patch Creates a bttv-cards.c.orig file.

v4l_801_whitespaces_cleanups.patch
Creates a tvaudio.c.orig file.

Auch! I need to review my scripts... It is supposed to had a rule there
to avoid this stuff...

Quoted 2 lines

I would also suggest that you limit the length of the patch file names. v4l_716_from_markus_rechberger_mrechberger_gmail_com_ludovico_cavedon_cavedon_sssup_it_mauro_carvalho_chehab_mchehab_brturbo_com_br_.patch is a bit too long IMHO ;)

This patch name was wrongly generated, but I'll include such rule on my
stript.

Quoted 13 lines
Quoted 8 lines

Basically, your patches should be go after the V4L patchsets, and should also include some newer boards, like:

	em2820-i2c.c
	cs53l32a.c
	wm8775.c
	saa711x.c
	tvp5150.c

No, it doesn't work that way. i2c patches are applied before the v4l patches in -mm, and I doubt Andrew is going to reorder patchsets every now and then. There simply are too many dependencies to deal with.

Quoted 7 lines

So, just send your v4l patches to Andrew when they're ready. I'll send my i2c patches (including Laurent's) when they are ready, with a note to Andrew on how to fix drivers which might break, and he'll deal with that just fine.

You shouldn't underestimate Andrew's ability to deal with conflicts of all sorts. He's damn good at it.

I know :) I just try to avoid overcharge him with unnecessary
conflicts.

Quoted 4 lines

When either the i2c or v4l patches finally get merged into Linus' tree, the other one of us will have to update his patchset. That shouldn't be difficult either.

For sure. Btw, for now, I didn't sent a patch including wm8775 and
saa711x on Makefile/Kconfig. I'll send two or tree more drivers from ivtv tree (cx25840 - a big one, saa7127 and a different version of saa711x that will replace the current version and provide support for more chips). With these, I'll include Makefile/Kconfig, so we should notice what were broken because of Laurent (and other I2c) recent changes.

Quoted 1 line

Thanks,

Cheers,
Mauro.

_______________________________________________________
Yahoo! Acesso Gr?tis: Internet r?pida e gr?tis.
Instale o discador agora!
http://br.acesso.yahoo.com/