aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/usb/dvb-usb-v2
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-09-20 21:58:20 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-27 15:14:19 -0300
commitd6f35c7128201b78fe2cb2c1eca3a5c67929566c (patch)
treebbb8b6fca07697f22bf478952c1b3e795254d235 /drivers/media/usb/dvb-usb-v2
parent3d8866dbb14923ce51f37b7e29d12075965acfa0 (diff)
[media] cypress_firmware: use Kernel dev_foo() logging
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2')
-rw-r--r--drivers/media/usb/dvb-usb-v2/cypress_firmware.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/cypress_firmware.c b/drivers/media/usb/dvb-usb-v2/cypress_firmware.c
index 9f7c970c642..bb21eeea549 100644
--- a/drivers/media/usb/dvb-usb-v2/cypress_firmware.c
+++ b/drivers/media/usb/dvb-usb-v2/cypress_firmware.c
@@ -30,6 +30,9 @@ static const struct usb_cypress_controller cypress[] = {
static int usb_cypress_writemem(struct usb_device *udev, u16 addr, u8 *data,
u8 len)
{
+ dvb_usb_dbg_usb_control_msg(udev,
+ 0xa0, USB_TYPE_VENDOR, addr, 0x00, data, len);
+
return usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
0xa0, USB_TYPE_VENDOR, addr, 0x00, data, len, 5000);
}
@@ -45,24 +48,24 @@ int usbv2_cypress_load_firmware(struct usb_device *udev,
reset = 1;
ret = usb_cypress_writemem(udev, cypress[type].cs_reg, &reset, 1);
if (ret != 1)
- pr_err("%s: could not stop the USB controller CPU",
+ dev_err(&udev->dev,
+ "%s: could not stop the USB controller CPU\n",
KBUILD_MODNAME);
while ((ret = dvb_usbv2_get_hexline(fw, &hx, &pos)) > 0) {
- pr_debug("%s: writing to address %04x (buffer: %02x %02x)\n",
- __func__, hx.addr, hx.len, hx.chk);
-
ret = usb_cypress_writemem(udev, hx.addr, hx.data, hx.len);
if (ret != hx.len) {
- pr_err("%s: error while transferring firmware " \
- "(transferred size=%d, block size=%d)",
+ dev_err(&udev->dev, "%s: error while transferring " \
+ "firmware (transferred size=%d, " \
+ "block size=%d)\n",
KBUILD_MODNAME, ret, hx.len);
ret = -EINVAL;
break;
}
}
if (ret < 0) {
- pr_err("%s: firmware download failed at %d with %d",
+ dev_err(&udev->dev,
+ "%s: firmware download failed at %d with %d\n",
KBUILD_MODNAME, pos, ret);
return ret;
}
@@ -72,8 +75,8 @@ int usbv2_cypress_load_firmware(struct usb_device *udev,
reset = 0;
if (ret || usb_cypress_writemem(
udev, cypress[type].cs_reg, &reset, 1) != 1) {
- pr_err("%s: could not restart the USB controller CPU",
- KBUILD_MODNAME);
+ dev_err(&udev->dev, "%s: could not restart the USB " \
+ "controller CPU\n", KBUILD_MODNAME);
ret = -EINVAL;
}
} else