summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-25 11:06:21 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-25 11:06:21 -0200
commit83f9b196743f52d7b3e0566287bf173fac764bd5 (patch)
tree02c9ef93fd9d605b457bb3ac476f9703180520aa /linux/drivers/media/video/em28xx/em28xx-cards.c
parentefb46542b7fee04e74f27680711a75dfda1861e2 (diff)
downloadmediapointer-dvb-s2-83f9b196743f52d7b3e0566287bf173fac764bd5.tar.gz
mediapointer-dvb-s2-83f9b196743f52d7b3e0566287bf173fac764bd5.tar.bz2
em28xx: improve debug messages
From: Mauro Carvalho Chehab <mchehab@redhat.com> Now, the first message states board names. Also, removed printing the alternate settings by default. I2C messages are now clearer. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index 43a768b5f..137ed3399 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -1279,6 +1279,10 @@ void em28xx_pre_card_setup(struct em28xx *dev)
{
int rc;
+ em28xx_set_model(dev);
+
+ em28xx_info("Found %s\n", dev->board.name);
+
/* Set the default GPO/GPIO for legacy devices */
dev->reg_gpo_num = EM2880_R04_GPO;
dev->reg_gpio_num = EM28XX_R08_GPIO;
@@ -1289,7 +1293,8 @@ void em28xx_pre_card_setup(struct em28xx *dev)
rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
if (rc > 0) {
dev->chip_id = rc;
- switch (rc) {
+
+ switch (dev->chip_id) {
case CHIP_ID_EM2750:
em28xx_info("chip ID is em2750\n");
break;
@@ -1312,7 +1317,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
dev->wait_after_write = 0;
break;
default:
- em28xx_info("em28xx chip ID = %d\n", rc);
+ em28xx_info("em28xx chip ID = %d\n", dev->chip_id);
}
}
@@ -1321,8 +1326,6 @@ void em28xx_pre_card_setup(struct em28xx *dev)
if (rc >= 0)
dev->reg_gpo = rc;
- em28xx_set_model(dev);
-
/* Those are the default values for the majority of boards
Use those values if not specified otherwise at boards entry
*/