diff options
Diffstat (limited to 'linux/drivers/media/video/tda9887.c')
-rw-r--r-- | linux/drivers/media/video/tda9887.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c index de92fadf5..32cce5eec 100644 --- a/linux/drivers/media/video/tda9887.c +++ b/linux/drivers/media/video/tda9887.c @@ -11,16 +11,12 @@ #include <linux/delay.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "audiochip.h" -#include "tuner.h" -#include "id.h" -#include "i2c-compat.h" -#else +#include <media/i2c-compat.h> +#endif #include <media/audiochip.h> #include <media/tuner.h> #include <media/id.h> -#endif -#include "compat.h" + /* Chips: TDA9885 (PAL, NTSC) @@ -505,9 +501,15 @@ static int tda9887_set_pinnacle(struct tda9887 *t, char *buf) /* ---------------------------------------------------------------------- */ static char pal[] = "-"; -module_param_string(pal, pal, sizeof(pal), 0644); static char secam[] = "-"; + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +MODULE_PARM(pal,"s"); +MODULE_PARM(secam,"s"); +#else +module_param_string(pal, pal, sizeof(pal), 0644); module_param_string(secam, secam, sizeof(secam), 0644); +#endif static int tda9887_fixup_std(struct tda9887 *t) { @@ -667,7 +669,9 @@ static int tda9887_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, tda9887_attach); break; } @@ -819,9 +823,10 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13) static int tda9887_suspend(struct device * dev, pm_message_t state, u32 level) -#else +#elif LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) static int tda9887_suspend(struct device * dev, u32 state, u32 level) #endif +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) { dprintk("tda9887: suspend\n"); return 0; @@ -836,7 +841,7 @@ static int tda9887_resume(struct device * dev, u32 level) tda9887_configure(t); return 0; } - +#endif /* ----------------------------------------------------------------------- */ static struct i2c_driver driver = { @@ -849,10 +854,12 @@ static struct i2c_driver driver = { .attach_adapter = tda9887_probe, .detach_client = tda9887_detach, .command = tda9887_command, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) .driver = { .suspend = tda9887_suspend, .resume = tda9887_resume, }, +#endif }; static struct i2c_client client_template = { |