diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-17 17:30:16 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-17 17:30:16 -0200 |
commit | 83e043633e367fdfebb7dca7cf731ea5c1ade20e (patch) | |
tree | 52a945edb3e8067bd7e29833c17eeb39f9ed69d6 /linux/drivers | |
parent | a349629a21213f0e9404961ebcdcf46ff40480b9 (diff) | |
parent | 99b704ae3fed61af893ab8a99d17a67b22db9db1 (diff) | |
download | mediapointer-dvb-s2-83e043633e367fdfebb7dca7cf731ea5c1ade20e.tar.gz mediapointer-dvb-s2-83e043633e367fdfebb7dca7cf731ea5c1ade20e.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/m920x
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/m920x.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/m920x.c b/linux/drivers/media/dvb/dvb-usb/m920x.c index e63f1edba..2d521df83 100644 --- a/linux/drivers/media/dvb/dvb-usb/m920x.c +++ b/linux/drivers/media/dvb/dvb-usb/m920x.c @@ -47,11 +47,15 @@ static inline int m9206_read(struct usb_device *udev, u8 request, u16 value,\ ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), request, USB_TYPE_VENDOR | USB_DIR_IN, value, index, data, size, 2000); - if (ret < 0) + if (ret < 0) { + printk(KERN_INFO "m920x_read = error: %d\n", ret); return ret; + } - if (ret != size) + if (ret != size) { + deb_rc("m920x_read = no data\n"); return -EIO; + } return 0; } @@ -64,6 +68,7 @@ static inline int m9206_write(struct usb_device *udev, u8 request, ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), request, USB_TYPE_VENDOR | USB_DIR_OUT, value, index, NULL, 0, 2000); + return ret; } @@ -323,6 +328,7 @@ static int m9206_firmware_download(struct usb_device *udev, i += size; } if (i != fw->size) { + deb_rc("bad firmware file!\n"); ret = -EINVAL; goto done; } @@ -341,10 +347,10 @@ static int m9206_firmware_download(struct usb_device *udev, } /* Callbacks for DVB USB */ -static int megasky_identify_state(struct usb_device *udev, - struct dvb_usb_device_properties *props, - struct dvb_usb_device_description **desc, - int *cold) +static int m920x_identify_state(struct usb_device *udev, + struct dvb_usb_device_properties *props, + struct dvb_usb_device_description **desc, + int *cold) { struct usb_host_interface *alt; @@ -463,7 +469,7 @@ static struct dvb_usb_device_properties megasky_properties = { .size_of_priv = sizeof(struct m9206_state), - .identify_state = megasky_identify_state, + .identify_state = m920x_identify_state, .num_adapters = 1, .adapter = {{ .caps = DVB_USB_ADAP_HAS_PID_FILTER | |