diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-09 17:17:32 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-09 17:17:32 +0000 |
commit | 6807eba35cc91e109fed1df6038c424496cf2add (patch) | |
tree | 475351eb821b9e5a741faa5ba2f97e27cbf2e857 /linux/drivers/media/video/tda7432.c | |
parent | 1faa3dcb3917ba99177697e1b8b4473e388744f8 (diff) | |
download | mediapointer-dvb-s2-6807eba35cc91e109fed1df6038c424496cf2add.tar.gz mediapointer-dvb-s2-6807eba35cc91e109fed1df6038c424496cf2add.tar.bz2 |
Several i2C cleanups to compile on both current linux and kernels >2.6.15
kernel-sync
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/tda7432.c')
-rw-r--r-- | linux/drivers/media/video/tda7432.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c index 7e050b5b5..3332d48b3 100644 --- a/linux/drivers/media/video/tda7432.c +++ b/linux/drivers/media/video/tda7432.c @@ -44,18 +44,18 @@ #include <linux/delay.h> #include <linux/errno.h> #include <linux/slab.h> +#include "compat.h" #include <linux/videodev.h> #include <linux/i2c.h> #include <linux/i2c-algo-bit.h> #include "bttv.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "audiochip.h" -#include "id.h" #include "i2c-compat.h" #else -#include <media/audiochip.h> #endif +#include <media/audiochip.h> +#include <media/v4l2-common.h> #ifndef VIDEO_AUDIO_BALANCE # define VIDEO_AUDIO_BALANCE 32 @@ -340,7 +340,7 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr, #endif i2c_attach_client(client); - v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name); + v4l_info(client, "chip found @ 0x%x (%s)\n", addr << 1, adap->name); return 0; } @@ -374,7 +374,9 @@ static int tda7432_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct tda7432 *t = i2c_get_clientdata(client); - d2printk("tda7432: In tda7432_command\n"); + v4l_dbg(2,client,"In tda7432_command\n"); + if (debug>1) + v4l_i2c_print_ioctl(client,cmd); switch (cmd) { /* --- v4l ioctls --- */ @@ -385,7 +387,6 @@ static int tda7432_command(struct i2c_client *client, case VIDIOCGAUDIO: { struct video_audio *va = arg; - dprintk("tda7432: VIDIOCGAUDIO\n"); va->flags |= VIDEO_AUDIO_VOLUME | VIDEO_AUDIO_BASS | @@ -440,7 +441,6 @@ static int tda7432_command(struct i2c_client *client, case VIDIOCSAUDIO: { struct video_audio *va = arg; - dprintk("tda7432: VIDEOCSAUDIO\n"); if(va->flags & VIDEO_AUDIO_VOLUME){ if(!maxvol){ /* max +20db */ @@ -516,11 +516,6 @@ static int tda7432_command(struct i2c_client *client, } /* end of VIDEOCSAUDIO case */ - default: /* Not VIDEOCGAUDIO or VIDEOCSAUDIO */ - - /* nothing */ - d2printk("tda7432: Default\n"); - } /* end of (cmd) switch */ return 0; @@ -553,7 +548,7 @@ static struct i2c_client client_template = static int __init tda7432_init(void) { if ( (loudness < 0) || (loudness > 15) ) { - printk(KERN_ERR "tda7432: loudness parameter must be between 0 and 15\n"); + printk(KERN_ERR "loudness parameter must be between 0 and 15\n"); return -EINVAL; } |