This really simple patch makes it so the 130K of text in
cx25840-registers (value-maps, register names, descriptions) is not
compiled into the driver unless 'CX25840_STRINGS' is defined.
This breaks nothing, really, since cx25840ctl is already broken.
The text stuff in cx25840-registers will still be very useful when
linked with a modifed cx25840ctl, but there's no real reason to store
that stuff in the module.
--
Tyler Trafford
--- ivtv-0.3.2s/driver/cx25840-registers.c 2005-04-04 17:06:20.000000000 -0400
+++ ivtv-0.3.2s-tt/driver/cx25840-registers.c 2005-04-05 18:30:13.000000000 -0400
@@ -375,6 +375,8 @@
DEFINE_REGISTER_INFO_ENTRY(0x09c1, RO),
DEFINE_REGISTER_INFO_ENTRY(0x09c2, RO)
};
+
+#ifdef CX25840_STRINGS
char *cx25840_register_name[] = {
"Host_Register_1",
"Host_Register_2",
@@ -739,6 +741,8 @@
"RDS_I_High",
"RDS_Q_Low"
};
+#endif
+
__u8 cx25840_register_default[] = {
0x04,
0x00,
@@ -1103,6 +1107,8 @@
0x00,
0x00
};
+
+#ifdef CX25840_STRINGS
value_map SLEEP_value_map[] = {
{0x0000, "Do not power down"},
{0x0001, "Power down"},
@@ -3076,6 +3082,15 @@
};
#define DEFINE_SETTING_ENTRY(name, rname, sbit, bitl, type, default, vptr, des) { (((rname)&0x1ff)<<0)|(((sbit)&0x7)<<9)|(((bitl)&0x1f)<<12)|(((type)&0xf)<<17),default, name, vptr, des }
+#else
+
+value_map NULL__value_map[] = {
+ {0, 0}
+};
+
+#define DEFINE_SETTING_ENTRY(name, rname, sbit, bitl, type, default, vptr, des) { (((rname)&0x1ff)<<0)|(((sbit)&0x7)<<9)|(((bitl)&0x1f)<<12)|(((type)&0xf)<<17),default, "", NULL__value_map, "" }
+#endif
+
cx25840_setting_entry cx25840_settings[] = {
DEFINE_SETTING_ENTRY("SLEEP", Host_Register_1, 0, 1, RW, 0x0000,
SLEEP_value_map,