Skip to contentSkip to conversation

drivers/media/video/tveeprom.c: possible cleanups

PATCH In review Adrian Bunk 2 participants 3 messages Apr 19, 2005 – May 1, 2005 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/media/video/tveeprom.c: possible cleanups

This patch contains the following possible cleanups:
- make two needlessly global structs static
- #if 0 the EXPORT_SYMBOL'ed but unused function tveeprom_dump

---

 drivers/media/video/tveeprom.c |    6 ++++--
 include/media/tveeprom.h       |    1 -
 2 files changed, 4 insertions(+), 3 deletions(-)
include/media/tveeprom.h renamed from include/media/tveeprom.h.old +0 -1
@@ -20,4 +20,3 @@
 			       unsigned char *eeprom_data);
 
 int tveeprom_read(struct i2c_client *c, unsigned char *eedata, int len);
-int tveeprom_dump(unsigned char *eedata, int len);
drivers/media/video/tveeprom.c renamed from drivers/media/video/tveeprom.c.old +4 -2
@@ -453,6 +453,7 @@
 }
 EXPORT_SYMBOL(tveeprom_read);
 
+#if 0
 int tveeprom_dump(unsigned char *eedata, int len)
 {
 	int i;
@@ -468,6 +469,7 @@
 	return 0;
 }
 EXPORT_SYMBOL(tveeprom_dump);
+#endif  /*  0  */
 
 /* ----------------------------------------------------------------------- */
 /* needed for ivtv.sf.net at the moment.  Should go away in the long       */
@@ -484,7 +486,7 @@
 };
 I2C_CLIENT_INSMOD;
 
-struct i2c_driver i2c_driver_tveeprom;
+static struct i2c_driver i2c_driver_tveeprom;
 
 static int
 tveeprom_command(struct i2c_client *client,
@@ -556,7 +558,7 @@
 	return 0;
 }
 
-struct i2c_driver i2c_driver_tveeprom = {
+static struct i2c_driver i2c_driver_tveeprom = {
 	.owner          = THIS_MODULE,
 	.name           = "tveeprom",
 	.id             = I2C_DRIVERID_TVEEPROM,
#1 lore raw
Quoted 1 line

- #if 0 the EXPORT_SYMBOL'ed but unused function tveeprom_dump

That's a debug helper function, please don't drop it. #if 0 might be ok, not sure though, the tveeprom module is also used by a out-of-kernel driver (ivtv). Otherwise the patch looks fine to me.

Gerd

#2 lore raw
Quoted 5 lines · Gerd Knorr
Quoted 1 line

- #if 0 the EXPORT_SYMBOL'ed but unused function tveeprom_dump

That's a debug helper function, please don't drop it. #if 0 might be ok, not sure though, the tveeprom module is also used by a out-of-kernel driver (ivtv). Otherwise the patch looks fine to me.

As the comment says, my patch does #if 0 the function.

Quoted 1 line

Gerd

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed