aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tda7432.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tda7432.c')
-rw-r--r--drivers/media/video/tda7432.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c
index 99261f15e66e..fc3d5824efff 100644
--- a/drivers/media/video/tda7432.c
+++ b/drivers/media/video/tda7432.c
@@ -227,8 +227,8 @@ static struct i2c_client client_template;
227static int tda7432_write(struct i2c_client *client, int subaddr, int val) 227static int tda7432_write(struct i2c_client *client, int subaddr, int val)
228{ 228{
229 unsigned char buffer[2]; 229 unsigned char buffer[2];
230 v4l_dbg(2,client,"In tda7432_write\n"); 230 v4l_dbg(2, debug,client,"In tda7432_write\n");
231 v4l_dbg(1,client,"Writing %d 0x%x\n", subaddr, val); 231 v4l_dbg(1, debug,client,"Writing %d 0x%x\n", subaddr, val);
232 buffer[0] = subaddr; 232 buffer[0] = subaddr;
233 buffer[1] = val; 233 buffer[1] = val;
234 if (2 != i2c_master_send(client,buffer,2)) { 234 if (2 != i2c_master_send(client,buffer,2)) {
@@ -245,9 +245,9 @@ static int tda7432_set(struct i2c_client *client)
245{ 245{
246 struct tda7432 *t = i2c_get_clientdata(client); 246 struct tda7432 *t = i2c_get_clientdata(client);
247 unsigned char buf[16]; 247 unsigned char buf[16];
248 v4l_dbg(2,client,"In tda7432_set\n"); 248 v4l_dbg(2, debug,client,"In tda7432_set\n");
249 249
250 v4l_dbg(1,client, 250 v4l_dbg(1, debug,client,
251 "tda7432: 7432_set(0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x)\n", 251 "tda7432: 7432_set(0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x)\n",
252 t->input,t->volume,t->bass,t->treble,t->lf,t->lr,t->rf,t->rr,t->loud); 252 t->input,t->volume,t->bass,t->treble,t->lf,t->lr,t->rf,t->rr,t->loud);
253 buf[0] = TDA7432_IN; 253 buf[0] = TDA7432_IN;
@@ -271,7 +271,7 @@ static int tda7432_set(struct i2c_client *client)
271static void do_tda7432_init(struct i2c_client *client) 271static void do_tda7432_init(struct i2c_client *client)
272{ 272{
273 struct tda7432 *t = i2c_get_clientdata(client); 273 struct tda7432 *t = i2c_get_clientdata(client);
274 v4l_dbg(2,client,"In tda7432_init\n"); 274 v4l_dbg(2, debug,client,"In tda7432_init\n");
275 275
276 t->input = TDA7432_STEREO_IN | /* Main (stereo) input */ 276 t->input = TDA7432_STEREO_IN | /* Main (stereo) input */
277 TDA7432_BASS_SYM | /* Symmetric bass cut */ 277 TDA7432_BASS_SYM | /* Symmetric bass cut */
@@ -300,10 +300,9 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr, int kind)
300 struct tda7432 *t; 300 struct tda7432 *t;
301 struct i2c_client *client; 301 struct i2c_client *client;
302 302
303 t = kmalloc(sizeof *t,GFP_KERNEL); 303 t = kzalloc(sizeof *t,GFP_KERNEL);
304 if (!t) 304 if (!t)
305 return -ENOMEM; 305 return -ENOMEM;
306 memset(t,0,sizeof *t);
307 306
308 client = &t->c; 307 client = &t->c;
309 memcpy(client,&client_template,sizeof(struct i2c_client)); 308 memcpy(client,&client_template,sizeof(struct i2c_client));
@@ -340,7 +339,7 @@ static int tda7432_command(struct i2c_client *client,
340 unsigned int cmd, void *arg) 339 unsigned int cmd, void *arg)
341{ 340{
342 struct tda7432 *t = i2c_get_clientdata(client); 341 struct tda7432 *t = i2c_get_clientdata(client);
343 v4l_dbg(2,client,"In tda7432_command\n"); 342 v4l_dbg(2, debug,client,"In tda7432_command\n");
344 if (debug>1) 343 if (debug>1)
345 v4l_i2c_print_ioctl(client,cmd); 344 v4l_i2c_print_ioctl(client,cmd);
346 345