diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-11-09 00:38:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:23 -0500 |
commit | 67678360c8b8b15b05d730eb8f1b02411891417f (patch) | |
tree | 35746b2e2d69344586d4551c2d45c79aeb3e2286 | |
parent | f958b68d40b870f5a0d1582f094bc93a53af7cd7 (diff) |
[PATCH] v4l: 830: rearranged print order to present a correct answer
- Rearranged print order to present a correct answer.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/media/video/tuner-core.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index ee83deb389d7..6fd59be19182 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -348,16 +348,13 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) | |||
348 | t->audmode = V4L2_TUNER_MODE_STEREO; | 348 | t->audmode = V4L2_TUNER_MODE_STEREO; |
349 | t->mode_mask = T_UNINITIALIZED; | 349 | t->mode_mask = T_UNINITIALIZED; |
350 | 350 | ||
351 | |||
352 | tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name); | ||
353 | |||
354 | if (show_i2c) { | 351 | if (show_i2c) { |
355 | unsigned char buffer[16]; | 352 | unsigned char buffer[16]; |
356 | int i,rc; | 353 | int i,rc; |
357 | 354 | ||
358 | memset(buffer, 0, sizeof(buffer)); | 355 | memset(buffer, 0, sizeof(buffer)); |
359 | rc = i2c_master_recv(&t->i2c, buffer, sizeof(buffer)); | 356 | rc = i2c_master_recv(&t->i2c, buffer, sizeof(buffer)); |
360 | printk("tuner-%04x I2C RECV = ",addr); | 357 | tuner_info("I2C RECV = "); |
361 | for (i=0;i<rc;i++) | 358 | for (i=0;i<rc;i++) |
362 | printk("%02x ",buffer[i]); | 359 | printk("%02x ",buffer[i]); |
363 | printk("\n"); | 360 | printk("\n"); |
@@ -373,14 +370,14 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) | |||
373 | t->freq = 87.5 * 16; /* Sets freq to FM range */ | 370 | t->freq = 87.5 * 16; /* Sets freq to FM range */ |
374 | default_mode_mask &= ~T_RADIO; | 371 | default_mode_mask &= ~T_RADIO; |
375 | 372 | ||
376 | i2c_attach_client (&t->i2c); | 373 | goto register_client; |
377 | set_type(&t->i2c,t->type, t->mode_mask); | ||
378 | return 0; | ||
379 | } | 374 | } |
380 | case 0x42: | 375 | case 0x42: |
381 | case 0x43: | 376 | case 0x43: |
382 | case 0x4a: | 377 | case 0x4a: |
383 | case 0x4b: | 378 | case 0x4b: |
379 | /* If chip is not tda8290, don't register. | ||
380 | since it can be tda9887*/ | ||
384 | if (tda8290_probe(&t->i2c) != 0) { | 381 | if (tda8290_probe(&t->i2c) != 0) { |
385 | kfree(t); | 382 | kfree(t); |
386 | return 0; | 383 | return 0; |
@@ -399,6 +396,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) | |||
399 | } | 396 | } |
400 | 397 | ||
401 | /* Should be just before return */ | 398 | /* Should be just before return */ |
399 | register_client: | ||
400 | tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name); | ||
402 | i2c_attach_client (&t->i2c); | 401 | i2c_attach_client (&t->i2c); |
403 | set_type (&t->i2c,t->type, t->mode_mask); | 402 | set_type (&t->i2c,t->type, t->mode_mask); |
404 | return 0; | 403 | return 0; |