[media] em28xx-camera: fix return value checks on sensor probing
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Fri, 17 Jan 2014 17:45:31 +0000 (14:45 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 4 Feb 2014 18:40:43 +0000 (16:40 -0200)
Since commit e63b009d6e the returned error code in case of not connected/responding
i2c clients is ENXIO isntead of ENODEV, which causes several error messages on
sensor probing.
Fix the i2c return value checks on sensor probing to silence these warnings.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-camera.c

index c29f5c4e7b4074858503d0ef876540a0ede66db1..505e0505be040caf5b90c0273409cb089ee20e19 100644 (file)
@@ -120,7 +120,7 @@ static int em28xx_probe_sensor_micron(struct em28xx *dev)
                reg = 0x00;
                ret = i2c_master_send(&client, &reg, 1);
                if (ret < 0) {
-                       if (ret != -ENODEV)
+                       if (ret != -ENXIO)
                                em28xx_errdev("couldn't read from i2c device 0x%02x: error %i\n",
                                              client.addr << 1, ret);
                        continue;
@@ -218,7 +218,7 @@ static int em28xx_probe_sensor_omnivision(struct em28xx *dev)
                reg = 0x1c;
                ret = i2c_smbus_read_byte_data(&client, reg);
                if (ret < 0) {
-                       if (ret != -ENODEV)
+                       if (ret != -ENXIO)
                                em28xx_errdev("couldn't read from i2c device 0x%02x: error %i\n",
                                              client.addr << 1, ret);
                        continue;