Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155771
b: refs/heads/master
c: b04fb66
h: refs/heads/master
i:
  155769: 9519118
  155767: 0a97005
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jul 24, 2009
1 parent 1aeaa3f commit a62cb53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9873740b2f41b37ec074afd4b8910b87dbebc0db
refs/heads/master: b04fb6615285d18df34ffd6cdd51db7a8a78dda0
18 changes: 9 additions & 9 deletions trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ struct em28xx_board em28xx_boards[] = {
[EM2820_BOARD_UNKNOWN] = {
.name = "Unknown EM2750/28xx video grabber",
.tuner_type = TUNER_ABSENT,
.is_webcam = 1, /* To enable sensor probe */
},
[EM2750_BOARD_DLCW_130] = {
/* Beijing Huaqi Information Digital Technology Co., Ltd */
Expand Down Expand Up @@ -1719,10 +1720,6 @@ static int em28xx_hint_sensor(struct em28xx *dev)
__be16 version_be;
u16 version;

if (dev->model != EM2820_BOARD_UNKNOWN &&
dev->model != EM2750_BOARD_UNKNOWN)
return 0;

dev->i2c_client.addr = 0xba >> 1;
cmd = 0;
i2c_master_send(&dev->i2c_client, &cmd, 1);
Expand Down Expand Up @@ -1777,10 +1774,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
em28xx_info("chip ID is em2750\n");
break;
case CHIP_ID_EM2820:
if (dev->board.is_webcam)
em28xx_info("chip is em2710\n");
else
em28xx_info("chip ID is em2820\n");
em28xx_info("chip ID is em2710 or em2820\n");
break;
case CHIP_ID_EM2840:
em28xx_info("chip ID is em2840\n");
Expand Down Expand Up @@ -2415,7 +2409,13 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
return errCode;
}

em28xx_hint_sensor(dev);
/*
* If the device can be a webcam, seek for a sensor.
* If sensor is not found, then it isn't a webcam.
*/
if (dev->board.is_webcam)
if (em28xx_hint_sensor(dev) < 0)
dev->board.is_webcam = 0;

/* Do board specific init and eeprom reading */
em28xx_card_setup(dev);
Expand Down

0 comments on commit a62cb53

Please sign in to comment.