diff options
-rw-r--r-- | linux/include/sound/tea575x-tuner.h | 18 | ||||
-rw-r--r-- | linux/sound/i2c/other/tea575x-tuner.c | 16 |
2 files changed, 34 insertions, 0 deletions
diff --git a/linux/include/sound/tea575x-tuner.h b/linux/include/sound/tea575x-tuner.h index aca07adb5..978fd322a 100644 --- a/linux/include/sound/tea575x-tuner.h +++ b/linux/include/sound/tea575x-tuner.h @@ -26,15 +26,28 @@ #include <linux/videodev.h> #include <media/v4l2-dev.h> +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +typedef struct snd_tea575x tea575x_t; +#else struct snd_tea575x; +#endif struct snd_tea575x_ops { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + void (*write)(tea575x_t *tea, unsigned int val); + unsigned int (*read)(tea575x_t *tea); +#else void (*write)(struct snd_tea575x *tea, unsigned int val); unsigned int (*read)(struct snd_tea575x *tea); +#endif }; struct snd_tea575x { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + snd_card_t *card; +#else struct snd_card *card; +#endif struct video_device vd; /* video device */ struct file_operations fops; int dev_nr; /* requested device number + 1 */ @@ -47,7 +60,12 @@ struct snd_tea575x { void *private_data; }; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +void snd_tea575x_init(tea575x_t *tea); +void snd_tea575x_exit(tea575x_t *tea); +#else void snd_tea575x_init(struct snd_tea575x *tea); void snd_tea575x_exit(struct snd_tea575x *tea); +#endif #endif /* __SOUND_TEA575X_TUNER_H */ diff --git a/linux/sound/i2c/other/tea575x-tuner.c b/linux/sound/i2c/other/tea575x-tuner.c index 1a4f39b8d..eccf7fa26 100644 --- a/linux/sound/i2c/other/tea575x-tuner.c +++ b/linux/sound/i2c/other/tea575x-tuner.c @@ -58,7 +58,11 @@ MODULE_LICENSE("GPL"); * lowlevel part */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +static void snd_tea575x_set_freq(tea575x_t *tea) +#else static void snd_tea575x_set_freq(struct snd_tea575x *tea) +#endif { unsigned long freq; @@ -89,7 +93,11 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long data) { struct video_device *dev = video_devdata(file); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + tea575x_t *tea = video_get_drvdata(dev); +#else struct snd_tea575x *tea = video_get_drvdata(dev); +#endif void __user *arg = (void __user *)data; switch(cmd) { @@ -175,7 +183,11 @@ static void snd_tea575x_release(struct video_device *vfd) /* * initialize all the tea575x chips */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +void snd_tea575x_init(tea575x_t *tea) +#else void snd_tea575x_init(struct snd_tea575x *tea) +#endif { unsigned int val; @@ -209,7 +221,11 @@ void snd_tea575x_init(struct snd_tea575x *tea) snd_tea575x_set_freq(tea); } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) +void snd_tea575x_exit(tea575x_t *tea) +#else void snd_tea575x_exit(struct snd_tea575x *tea) +#endif { if (tea->vd_registered) { video_unregister_device(&tea->vd); |