aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-core.c2
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-i2c.c5
-rw-r--r--drivers/media/usb/cx231xx/cx231xx.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c
index c5842a1ea104..66e8f8ae9be4 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,
227 227
228 /* call common vendor command request */ 228 /* call common vendor command request */
229 status = cx231xx_send_vendor_cmd(dev, &ven_req); 229 status = cx231xx_send_vendor_cmd(dev, &ven_req);
230 if (status < 0) { 230 if (status < 0 && !dev->i2c_scan_running) {
231 pr_err("%s: failed with status -%d\n", 231 pr_err("%s: failed with status -%d\n",
232 __func__, status); 232 __func__, status);
233 } 233 }
diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c
index 5a0604711be0..f99857e6c842 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)
496 if (!i2c_scan) 496 if (!i2c_scan)
497 return; 497 return;
498 498
499 /* Don't generate I2C errors during scan */
500 dev->i2c_scan_running = true;
501
499 memset(&client, 0, sizeof(client)); 502 memset(&client, 0, sizeof(client));
500 client.adapter = cx231xx_get_i2c_adap(dev, i2c_port); 503 client.adapter = cx231xx_get_i2c_adap(dev, i2c_port);
501 504
@@ -512,6 +515,8 @@ void cx231xx_do_i2c_scan(struct cx231xx *dev, int i2c_port)
512 } 515 }
513 pr_info("i2c scan: Completed Checking for I2C devices on port=%d.\n", 516 pr_info("i2c scan: Completed Checking for I2C devices on port=%d.\n",
514 i2c_port); 517 i2c_port);
518
519 dev->i2c_scan_running = false;
515} 520}
516 521
517/* 522/*
diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h
index aeee721a8eef..253f2437c0f1 100644
--- a/drivers/media/usb/cx231xx/cx231xx.h
+++ b/drivers/media/usb/cx231xx/cx231xx.h
@@ -610,6 +610,8 @@ struct cx231xx {
610 unsigned int has_audio_class:1; 610 unsigned int has_audio_class:1;
611 unsigned int has_alsa_audio:1; 611 unsigned int has_alsa_audio:1;
612 612
613 unsigned int i2c_scan_running:1; /* true only during i2c_scan */
614
613 struct cx231xx_fmt *format; 615 struct cx231xx_fmt *format;
614 616
615 struct v4l2_device v4l2_dev; 617 struct v4l2_device v4l2_dev;