From 6807eba35cc91e109fed1df6038c424496cf2add Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 9 Jan 2006 17:17:32 +0000 Subject: Several i2C cleanups to compile on both current linux and kernels >2.6.15 kernel-sync Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tda7432.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'linux/drivers/media/video/tda7432.c') 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 #include #include +#include "compat.h" #include #include #include #include "bttv.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "audiochip.h" -#include "id.h" #include "i2c-compat.h" #else -#include #endif +#include +#include #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; } -- cgit v1.2.3