break;
case CHIP_ID_EM2820:
chip_name = "em2710/2820";
+ if (dev->udev->descriptor.idVendor == 0xeb1a) {
+ __le16 idProd = dev->udev->descriptor.idProduct;
+ if (le16_to_cpu(idProd) == 0x2710)
+ chip_name = "em2710";
+ else if (le16_to_cpu(idProd) == 0x2820)
+ chip_name = "em2820";
+ }
+ /* NOTE: the em2820 is used in webcams, too ! */
break;
case CHIP_ID_EM2840:
chip_name = "em2840";
em28xx_pre_card_setup(dev);
- if (dev->chip_id == CHIP_ID_EM2820) {
- if (dev->board.is_webcam)
- chip_name = "em2710";
- else
- chip_name = "em2820";
- snprintf(dev->name, sizeof(dev->name), "%s #%d", chip_name, dev->devno);
- }
-
if (!dev->board.is_em2800) {
/* Resets I2C speed */
retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);