summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-10-09 18:07:06 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-10-09 18:07:06 +0000
commit1c769dacd06c44528955753c2cac21b1d4b8ddef (patch)
treecbd22854f18480a8054382799ade8c765ab618d1 /linux/drivers/media/video/tvaudio.c
parent15e9f7c5dda7607d5080c899de36fe6003e1318c (diff)
downloadmediapointer-dvb-s2-1c769dacd06c44528955753c2cac21b1d4b8ddef.tar.gz
mediapointer-dvb-s2-1c769dacd06c44528955753c2cac21b1d4b8ddef.tar.bz2
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
- Lots of small changes to allow compiling with kernel 2.4. Compilation result not tested yet. - After this patch, .version should be removed, since its syntax has changed. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/tvaudio.c')
-rw-r--r--linux/drivers/media/video/tvaudio.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index 4c8a7149e..ddf72da42 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -32,13 +32,11 @@
#include <linux/smp_lock.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include "audiochip.h"
-#include "id.h"
-#include "i2c-compat.h"
+#include <media/i2c-compat.h>
#else
+#endif
#include <media/audiochip.h>
#include <media/id.h>
-#endif
#include "tvaudio.h"
@@ -54,6 +52,7 @@ MODULE_LICENSE("GPL");
#define UNSET (-1U)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#define tvaudio_info(fmt, arg...) do {\
printk(KERN_INFO "tvaudio %d-%04x: " fmt, \
chip->c.adapter->nr, chip->c.addr , ##arg); } while (0)
@@ -64,6 +63,18 @@ MODULE_LICENSE("GPL");
if (debug) \
printk(KERN_INFO "tvaudio %d-%04x: " fmt, \
chip->c.adapter->nr, chip->c.addr , ##arg); } while (0)
+#else
+#define tvaudio_info(fmt, arg...) do {\
+ printk(KERN_INFO "tvaudio %04x: " fmt, \
+ chip->c.addr , ##arg); } while (0)
+#define tvaudio_warn(fmt, arg...) do {\
+ printk(KERN_WARNING "tvaudio %04x: " fmt, \
+ chip->c.addr , ##arg); } while (0)
+#define tvaudio_dbg(fmt, arg...) do {\
+ if (debug) \
+ printk(KERN_INFO "tvaudio %04x: " fmt, \
+ chip->c.addr , ##arg); } while (0)
+#endif
/* ---------------------------------------------------------------------- */
/* our structs */
@@ -293,7 +304,11 @@ static int chip_thread(void *data)
struct CHIPSTATE *chip = data;
struct CHIPDESC *desc = chiplist + chip->type;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
daemonize("%s", chip->c.name);
+#else
+ daemonize();
+#endif
allow_signal(SIGTERM);
tvaudio_dbg("%s: thread started\n", chip->c.name);
@@ -1594,7 +1609,9 @@ static int chip_probe(struct i2c_adapter *adap)
switch (adap->id) {
case I2C_HW_B_BT848:
case I2C_HW_B_RIVA:
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
case I2C_HW_SAA7134:
+#endif
return i2c_probe(adap, &addr_data, chip_attach);
}
#endif