summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx-camera.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-12-07 18:48:10 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-12-12 12:29:08 +0300
commit29b05e22f5c68c657f5ec30a31023b81124287fb (patch)
tree3c76e467ae57e57ba1af14837b1f599b838fcf61 /drivers/media/usb/em28xx/em28xx-camera.c
parentea48c3680829c0c522a799a4a9e0fb6cc5afd0a4 (diff)
downloadlinux-29b05e22f5c68c657f5ec30a31023b81124287fb.tar.xz
[media] em28xx: use usb_interface for dev_foo() calls
The usb_device->dev is not the right device for dev_foo() calls. Instead, it should use usb_interface->dev. Tested-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-camera.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-camera.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-camera.c b/drivers/media/usb/em28xx/em28xx-camera.c
index 2e24b65901ec..89c890ba7dd6 100644
--- a/drivers/media/usb/em28xx/em28xx-camera.c
+++ b/drivers/media/usb/em28xx/em28xx-camera.c
@@ -121,14 +121,14 @@ static int em28xx_probe_sensor_micron(struct em28xx *dev)
ret = i2c_master_send(&client, &reg, 1);
if (ret < 0) {
if (ret != -ENXIO)
- dev_err(&dev->udev->dev,
+ dev_err(&dev->intf->dev,
"couldn't read from i2c device 0x%02x: error %i\n",
client.addr << 1, ret);
continue;
}
ret = i2c_master_recv(&client, (u8 *)&id_be, 2);
if (ret < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(&dev->intf->dev,
"couldn't read from i2c device 0x%02x: error %i\n",
client.addr << 1, ret);
continue;
@@ -138,14 +138,14 @@ static int em28xx_probe_sensor_micron(struct em28xx *dev)
reg = 0xff;
ret = i2c_master_send(&client, &reg, 1);
if (ret < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(&dev->intf->dev,
"couldn't read from i2c device 0x%02x: error %i\n",
client.addr << 1, ret);
continue;
}
ret = i2c_master_recv(&client, (u8 *)&id_be, 2);
if (ret < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(&dev->intf->dev,
"couldn't read from i2c device 0x%02x: error %i\n",
client.addr << 1, ret);
continue;
@@ -185,16 +185,16 @@ static int em28xx_probe_sensor_micron(struct em28xx *dev)
dev->em28xx_sensor = EM28XX_MT9M001;
break;
default:
- dev_info(&dev->udev->dev,
+ dev_info(&dev->intf->dev,
"unknown Micron sensor detected: 0x%04x\n", id);
return 0;
}
if (dev->em28xx_sensor == EM28XX_NOSENSOR)
- dev_info(&dev->udev->dev,
+ dev_info(&dev->intf->dev,
"unsupported sensor detected: %s\n", name);
else
- dev_info(&dev->udev->dev,
+ dev_info(&dev->intf->dev,
"sensor %s detected\n", name);
dev->i2c_client[dev->def_i2c_bus].addr = client.addr;
@@ -225,7 +225,7 @@ static int em28xx_probe_sensor_omnivision(struct em28xx *dev)
ret = i2c_smbus_read_byte_data(&client, reg);
if (ret < 0) {
if (ret != -ENXIO)
- dev_err(&dev->udev->dev,
+ dev_err(&dev->intf->dev,
"couldn't read from i2c device 0x%02x: error %i\n",
client.addr << 1, ret);
continue;
@@ -234,7 +234,7 @@ static int em28xx_probe_sensor_omnivision(struct em28xx *dev)
reg = 0x1d;
ret = i2c_smbus_read_byte_data(&client, reg);
if (ret < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(&dev->intf->dev,
"couldn't read from i2c device 0x%02x: error %i\n",
client.addr << 1, ret);
continue;
@@ -247,7 +247,7 @@ static int em28xx_probe_sensor_omnivision(struct em28xx *dev)
reg = 0x0a;
ret = i2c_smbus_read_byte_data(&client, reg);
if (ret < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(&dev->intf->dev,
"couldn't read from i2c device 0x%02x: error %i\n",
client.addr << 1, ret);
continue;
@@ -256,7 +256,7 @@ static int em28xx_probe_sensor_omnivision(struct em28xx *dev)
reg = 0x0b;
ret = i2c_smbus_read_byte_data(&client, reg);
if (ret < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(&dev->intf->dev,
"couldn't read from i2c device 0x%02x: error %i\n",
client.addr << 1, ret);
continue;
@@ -296,17 +296,17 @@ static int em28xx_probe_sensor_omnivision(struct em28xx *dev)
name = "OV9655";
break;
default:
- dev_info(&dev->udev->dev,
+ dev_info(&dev->intf->dev,
"unknown OmniVision sensor detected: 0x%04x\n",
id);
return 0;
}
if (dev->em28xx_sensor == EM28XX_NOSENSOR)
- dev_info(&dev->udev->dev,
+ dev_info(&dev->intf->dev,
"unsupported sensor detected: %s\n", name);
else
- dev_info(&dev->udev->dev,
+ dev_info(&dev->intf->dev,
"sensor %s detected\n", name);
dev->i2c_client[dev->def_i2c_bus].addr = client.addr;
@@ -331,7 +331,7 @@ int em28xx_detect_sensor(struct em28xx *dev)
*/
if (dev->em28xx_sensor == EM28XX_NOSENSOR && ret < 0) {
- dev_info(&dev->udev->dev,
+ dev_info(&dev->intf->dev,
"No sensor detected\n");
return -ENODEV;
}