Skip to content

Commit

Permalink
V4L/DVB (9583): Remember chip id of devices at initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 1ed1dd5 commit 600bd7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
dev->wait_after_write = 5;
rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
if (rc > 0) {
dev->chip_id = rc;
switch (rc) {
case CHIP_ID_EM2860:
em28xx_info("chip ID is em2860\n");
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ struct em28xx {
char name[30]; /* name (including minor) of the device */
int model; /* index in the device_data struct */
int devno; /* marks the number of this device */
enum em28xx_chip_id chip_id;
unsigned int is_em2800:1;
unsigned int has_msp34xx:1;
unsigned int has_tda9887:1;
Expand Down

0 comments on commit 600bd7f

Please sign in to comment.