diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c index c5842a1ea10487ff76c0fe7559e361ce0b4c92b8..66e8f8ae9be46ceb7014b351779da61c242ac7df 100644 --- a/drivers/media/usb/cx231xx/cx231xx-core.c +++ b/drivers/media/usb/cx231xx/cx231xx-core.c @@ -227,7 +227,7 @@ int cx231xx_send_usb_command(struct cx231xx_i2c *i2c_bus, /* call common vendor command request */ status = cx231xx_send_vendor_cmd(dev, &ven_req); - if (status < 0) { + if (status < 0 && !dev->i2c_scan_running) { pr_err("%s: failed with status -%d\n", __func__, status); } diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c index 5a0604711be076b61fbaf69decb245a93d893eac..f99857e6c8423ddc505c8b0fcc32e9ad3108db1a 100644 --- a/drivers/media/usb/cx231xx/cx231xx-i2c.c +++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c @@ -496,6 +496,9 @@ void cx231xx_do_i2c_scan(struct cx231xx *dev, int i2c_port) if (!i2c_scan) return; + /* Don't generate I2C errors during scan */ + dev->i2c_scan_running = true; + memset(&client, 0, sizeof(client)); client.adapter = cx231xx_get_i2c_adap(dev, i2c_port); @@ -512,6 +515,8 @@ void cx231xx_do_i2c_scan(struct cx231xx *dev, int i2c_port) } pr_info("i2c scan: Completed Checking for I2C devices on port=%d.\n", i2c_port); + + dev->i2c_scan_running = false; } /* diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index aeee721a8eefd5f2b5a29d46a08609d1244e1abd..253f2437c0f10d9fc3bdc6910cbe1da96724a518 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h @@ -610,6 +610,8 @@ struct cx231xx { unsigned int has_audio_class:1; unsigned int has_alsa_audio:1; + unsigned int i2c_scan_running:1; /* true only during i2c_scan */ + struct cx231xx_fmt *format; struct v4l2_device v4l2_dev;