From a5c1e0911d203b6d468173df00f64db8044e7bce Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 10 Sep 2007 15:56:23 -0400 Subject: compat: fix build for kernels < 2.6.19 (missing ) From: Michael Krufky include/sound/tlv.h was first added in 2.6.19 Disable the TLV support for kernels prior to 2.6.19 Signed-off-by: Michael Krufky --- linux/drivers/media/video/cx88/cx88-alsa.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index dab6fbc06..f441193eb 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -39,7 +39,9 @@ #include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) #include +#endif #include "compat.h" #include "cx88.h" @@ -659,17 +661,23 @@ static int snd_cx88_volume_put(struct snd_kcontrol *kcontrol, return changed; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) static const DECLARE_TLV_DB_SCALE(snd_cx88_db_scale, -6300, 100, 0); +#endif static struct snd_kcontrol_new snd_cx88_volume = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, +#endif .name = "Playback Volume", .info = snd_cx88_volume_info, .get = snd_cx88_volume_get, .put = snd_cx88_volume_put, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) .tlv.p = snd_cx88_db_scale, +#endif }; static int snd_cx88_switch_get(struct snd_kcontrol *kcontrol, -- cgit v1.2.3