diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dibusb-common.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-common.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index 63b626f70c81..9b9d6f8ee74e 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c | |||
@@ -70,13 +70,22 @@ EXPORT_SYMBOL(dibusb_power_ctrl); | |||
70 | 70 | ||
71 | int dibusb2_0_streaming_ctrl(struct dvb_usb_device *d, int onoff) | 71 | int dibusb2_0_streaming_ctrl(struct dvb_usb_device *d, int onoff) |
72 | { | 72 | { |
73 | u8 b[2]; | 73 | u8 b[3] = { 0 }; |
74 | b[0] = DIBUSB_REQ_SET_IOCTL; | 74 | int ret; |
75 | b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM; | 75 | |
76 | if ((ret = dibusb_streaming_ctrl(d,onoff)) < 0) | ||
77 | return ret; | ||
76 | 78 | ||
77 | dvb_usb_generic_write(d,b,3); | 79 | if (onoff) { |
80 | b[0] = DIBUSB_REQ_SET_STREAMING_MODE; | ||
81 | b[1] = 0x00; | ||
82 | if ((ret = dvb_usb_generic_write(d,b,2)) < 0) | ||
83 | return ret; | ||
84 | } | ||
78 | 85 | ||
79 | return dibusb_streaming_ctrl(d,onoff); | 86 | b[0] = DIBUSB_REQ_SET_IOCTL; |
87 | b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM; | ||
88 | return dvb_usb_generic_write(d,b,3); | ||
80 | } | 89 | } |
81 | EXPORT_SYMBOL(dibusb2_0_streaming_ctrl); | 90 | EXPORT_SYMBOL(dibusb2_0_streaming_ctrl); |
82 | 91 | ||