Re: Fix compiling with older gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Julian Scheel wrote:

Attached is a patch which fixes compiling on older gcc-versions (I think <4.1, but am not sure). These do not support compiler-macros in a function-call.

-Julian
Julian,

Could you please reply to this email with your sign-off?

Thanks,

Mike

------------------------------------------------------------------------

diff -r 501a5801e21d linux/drivers/media/video/cx88/cx88-i2c.c
--- a/linux/drivers/media/video/cx88/cx88-i2c.c	Thu Apr 27 14:39:18 2006
+++ b/linux/drivers/media/video/cx88/cx88-i2c.c	Tue May  2 22:10:37 2006
@@ -98,10 +98,11 @@
	struct tuner_setup tun_setup;
	struct cx88_core *core = i2c_get_adapdata(client->adapter);

+#if LINUX_VERSION_CODE <=  KERNEL_VERSION(2,6,15)
	dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
-#if LINUX_VERSION_CODE <=  KERNEL_VERSION(2,6,15)
		client->driver->name, client->addr, client->name);
#else
+	dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
		client->driver->driver.name, client->addr, client->name);
#endif
	if (!client->driver->command)
diff -r 501a5801e21d linux/drivers/media/video/tuner-core.c
--- a/linux/drivers/media/video/tuner-core.c	Thu Apr 27 14:39:18 2006
+++ b/linux/drivers/media/video/tuner-core.c	Tue May  2 22:10:37 2006
@@ -257,13 +257,15 @@
		t->mode_mask = new_mode_mask;

	set_freq(c, (V4L2_TUNER_RADIO == t->mode) ? t->radio_freq : t->tv_freq);
+#if LINUX_VERSION_CODE <=  KERNEL_VERSION(2,6,15)
	tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
-#if LINUX_VERSION_CODE <=  KERNEL_VERSION(2,6,15)
		  c->adapter->name, c->driver->name, c->addr << 1, type,
+		  t->mode_mask);
#else
+	tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
		  c->adapter->name, c->driver->driver.name, c->addr << 1, type,
-#endif
		  t->mode_mask);
+#endif
}

/*


_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux