summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-06-26 00:04:33 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-04 07:56:38 -0300
commita13a6e1f9db8361cd018560f2664e3d341323a31 (patch)
treea788b9c91c1e484afe7e21e794e397977b6dd8c8 /drivers/media/dvb/dvb-usb
parent18cfe03d320b3b36e60145c5896afd5d911f63b2 (diff)
downloadop-kernel-dev-a13a6e1f9db8361cd018560f2664e3d341323a31.zip
op-kernel-dev-a13a6e1f9db8361cd018560f2664e3d341323a31.tar.gz
[media] dvb_usb_v2: change streaming control callback parameter
Pass frontend instead of adapter as some drivers need to make decisions based frontend. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/anysee.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dvb_usb.h2
-rw-r--r--drivers/media/dvb/dvb-usb/dvb_usb_core.c6
-rw-r--r--drivers/media/dvb/dvb-usb/ec168.c4
4 files changed, 9 insertions, 7 deletions
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c
index 87c978b..fb3829a 100644
--- a/drivers/media/dvb/dvb-usb/anysee.c
+++ b/drivers/media/dvb/dvb-usb/anysee.c
@@ -187,11 +187,11 @@ static int anysee_get_hw_info(struct dvb_usb_device *d, u8 *id)
return anysee_ctrl_msg(d, buf, sizeof(buf), id, 3);
}
-static int anysee_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
+static int anysee_streaming_ctrl(struct dvb_frontend *fe, int onoff)
{
u8 buf[] = {CMD_STREAMING_CTRL, (u8)onoff, 0x00};
deb_info("%s: onoff:%02x\n", __func__, onoff);
- return anysee_ctrl_msg(adap_to_d(adap), buf, sizeof(buf), NULL, 0);
+ return anysee_ctrl_msg(fe_to_d(fe), buf, sizeof(buf), NULL, 0);
}
static int anysee_led_ctrl(struct dvb_usb_device *d, u8 mode, u8 interval)
diff --git a/drivers/media/dvb/dvb-usb/dvb_usb.h b/drivers/media/dvb/dvb-usb/dvb_usb.h
index 036174c..6fcab07 100644
--- a/drivers/media/dvb/dvb-usb/dvb_usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb_usb.h
@@ -246,7 +246,7 @@ struct dvb_usb_device_properties {
int (*frontend_attach) (struct dvb_usb_adapter *);
int (*tuner_attach) (struct dvb_usb_adapter *);
int (*frontend_ctrl) (struct dvb_frontend *, int);
- int (*streaming_ctrl) (struct dvb_usb_adapter *, int);
+ int (*streaming_ctrl) (struct dvb_frontend *, int);
int (*fe_ioctl_override) (struct dvb_frontend *,
unsigned int, void *, unsigned int);
int (*init) (struct dvb_usb_device *);
diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_core.c b/drivers/media/dvb/dvb-usb/dvb_usb_core.c
index 93ce02a..07a0ac7 100644
--- a/drivers/media/dvb/dvb-usb/dvb_usb_core.c
+++ b/drivers/media/dvb/dvb-usb/dvb_usb_core.c
@@ -262,7 +262,8 @@ static inline int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed,
usb_urb_killv2(&adap->stream);
if (d->props->streaming_ctrl) {
- ret = d->props->streaming_ctrl(adap, 0);
+ ret = d->props->streaming_ctrl(
+ adap->fe[adap->active_fe], 0);
if (ret < 0) {
pr_err("%s: streaming_ctrl() failed=%d\n",
KBUILD_MODNAME, ret);
@@ -330,7 +331,8 @@ static inline int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed,
}
if (d->props->streaming_ctrl) {
- ret = d->props->streaming_ctrl(adap, 1);
+ ret = d->props->streaming_ctrl(
+ adap->fe[adap->active_fe], 1);
if (ret < 0) {
pr_err("%s: streaming_ctrl() failed=%d\n",
KBUILD_MODNAME, ret);
diff --git a/drivers/media/dvb/dvb-usb/ec168.c b/drivers/media/dvb/dvb-usb/ec168.c
index 1fb8472..ab77622 100644
--- a/drivers/media/dvb/dvb-usb/ec168.c
+++ b/drivers/media/dvb/dvb-usb/ec168.c
@@ -303,13 +303,13 @@ static int ec168_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap)
&ec168_mxl5003s_config) == NULL ? -ENODEV : 0;
}
-static int ec168_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
+static int ec168_streaming_ctrl(struct dvb_frontend *fe, int onoff)
{
struct ec168_req req = {STREAMING_CTRL, 0x7f01, 0x0202, 0, NULL};
pr_debug("%s: onoff=%d\n", __func__, onoff);
if (onoff)
req.index = 0x0102;
- return ec168_ctrl_msg(adap_to_d(adap), &req);
+ return ec168_ctrl_msg(fe_to_d(fe), &req);
}
/* DVB USB Driver stuff */
OpenPOWER on IntegriCloud