Skip to contentSkip to conversation

Videotext: use I2C_CLIENT_INSMOD macro

PATCH New Gerd Knorr 1 participant 1 message Mar 8, 2005 Media (V4L/DVB)

lore
Share & tools
lore

Gerd Knorr

author
#0 lore raw

PATCH 1/1 Videotext: use I2C_CLIENT_INSMOD macro

Hi,

the patch below simplifies the videotext drivers saa5246a and saa5249 by using the I2C_CLIENT_INSMOD macro.

Thanks to Kai Volkmar.

Michael

---
 drivers/media/video/saa5246a.c |   13 +------------
 drivers/media/video/saa5249.c  |   13 +------------
 2 files changed, 2 insertions(+), 24 deletions(-)
drivers/media/video/saa5246a.c +1 -12
diff -u linux-2.6.11/drivers/media/video/saa5246a.c linux/drivers/media/video/saa5246a.c
@@ -65,18 +65,7 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[]	 = { I2C_ADDRESS, I2C_CLIENT_END };
 static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
-static unsigned short probe[2]		 = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]	 = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]		 = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2]	 = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]		 = { I2C_CLIENT_END, I2C_CLIENT_END };
-
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range,
-	probe, probe_range,
-	ignore, ignore_range,
-	force
-};
+I2C_CLIENT_INSMOD;
 
 static struct i2c_client client_template;
 
drivers/media/video/saa5249.c +1 -12
diff -u linux-2.6.11/drivers/media/video/saa5249.c linux/drivers/media/video/saa5249.c
@@ -133,18 +133,7 @@
 /* Addresses to scan */
 static unsigned short normal_i2c[] = {34>>1,I2C_CLIENT_END};
 static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
-static unsigned short probe[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short probe_range[2]  = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore[2]       = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2]        = { I2C_CLIENT_END, I2C_CLIENT_END };
-
-static struct i2c_client_address_data addr_data = {
-	normal_i2c, normal_i2c_range, 
-	probe, probe_range, 
-	ignore, ignore_range, 
-	force
-};
+I2C_CLIENT_INSMOD;
 
 static struct i2c_client client_template;
 

Common subdirectories: linux-2.6.11/drivers/media/video/saa7134 and linux/drivers/media/video/saa7134

Signature · 1 line
#define printk(args...) fprintf(stderr, ## args)