aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 8b82c5528a1..3013abd00e0 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1274,6 +1274,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;
@@ -1284,7 +1288,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;
@@ -1307,7 +1312,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);
}
}
@@ -1316,8 +1321,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
*/