aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorDevin Heitmueller <devin.heitmueller@gmail.com>2008-11-12 00:05:02 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:32 -0500
commit600bd7f0edee0f9687c3c77e6fe63c74452acbfa (patch)
treea61362f6603ba60ef4653c4a8632fa7226008aa2 /drivers/media/video
parent1ed1dd54b0456a880ab4090275a47eb5a7a245d1 (diff)
V4L/DVB (9583): Remember chip id of devices at initialization
When setting up the device, remember the chip id, so we can control behavior in the future without having to read the register continuously. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c1
-rw-r--r--drivers/media/video/em28xx/em28xx.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index d93e1eb04331..90389270389b 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1319,6 +1319,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
1319 dev->wait_after_write = 5; 1319 dev->wait_after_write = 5;
1320 rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID); 1320 rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
1321 if (rc > 0) { 1321 if (rc > 0) {
1322 dev->chip_id = rc;
1322 switch (rc) { 1323 switch (rc) {
1323 case CHIP_ID_EM2860: 1324 case CHIP_ID_EM2860:
1324 em28xx_info("chip ID is em2860\n"); 1325 em28xx_info("chip ID is em2860\n");
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index d1679a6eb33f..fc2db0d60fca 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -370,6 +370,7 @@ struct em28xx {
370 char name[30]; /* name (including minor) of the device */ 370 char name[30]; /* name (including minor) of the device */
371 int model; /* index in the device_data struct */ 371 int model; /* index in the device_data struct */
372 int devno; /* marks the number of this device */ 372 int devno; /* marks the number of this device */
373 enum em28xx_chip_id chip_id;
373 unsigned int is_em2800:1; 374 unsigned int is_em2800:1;
374 unsigned int has_msp34xx:1; 375 unsigned int has_msp34xx:1;
375 unsigned int has_tda9887:1; 376 unsigned int has_tda9887:1;