diff options
Diffstat (limited to 'linux/drivers/media/video/tvaudio.c')
-rw-r--r-- | linux/drivers/media/video/tvaudio.c | 25 |
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 |