From 02e54ee836ff9cd1f7ca54fd826f9dc5f1693103 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Sat, 16 Jun 2012 16:02:57 -0300 Subject: [PATCH] --- yaml --- r: 330633 b: refs/heads/master c: 6400a8c5afb54a1018c4d01b7f1ad28c4e0ef659 h: refs/heads/master i: 330631: 519f6e4107dea0c523808aa4893a3a529dea8604 v: v3 --- [refs] | 2 +- .../media/dvb/dvb-usb/dvb_usb_common.h | 2 +- trunk/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c | 21 ++++++------------- trunk/drivers/media/dvb/dvb-usb/usb_urb.c | 2 +- 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index c70cdf811123..d56ec3d6005e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 12077a3aa4bfc1fb5ca779dcc6b3a1f45a475736 +refs/heads/master: 6400a8c5afb54a1018c4d01b7f1ad28c4e0ef659 diff --git a/trunk/drivers/media/dvb/dvb-usb/dvb_usb_common.h b/trunk/drivers/media/dvb/dvb-usb/dvb_usb_common.h index e1cff154c0ec..c94a900c3264 100644 --- a/trunk/drivers/media/dvb/dvb-usb/dvb_usb_common.h +++ b/trunk/drivers/media/dvb/dvb-usb/dvb_usb_common.h @@ -17,7 +17,7 @@ extern int dvb_usbv2_disable_rc_polling; extern int dvb_usbv2_device_power_ctrl(struct dvb_usb_device *d, int onoff); extern int usb_urb_initv2(struct usb_data_stream *stream, - struct usb_data_stream_properties *props); + const struct usb_data_stream_properties *props); extern int usb_urb_exitv2(struct usb_data_stream *stream); extern int usb_urb_submitv2(struct usb_data_stream *stream, struct usb_data_stream_properties *props); diff --git a/trunk/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c b/trunk/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c index 3cbae02ea51e..484114cbd0ba 100644 --- a/trunk/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c +++ b/trunk/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c @@ -34,31 +34,20 @@ static void dvb_usb_data_complete_raw(struct usb_data_stream *stream, int dvb_usbv2_adapter_stream_init(struct dvb_usb_adapter *adap) { - int ret; - struct usb_data_stream_properties stream_props; + pr_debug("%s: adap=%d\n", __func__, adap->id); adap->stream.udev = adap->dev->udev; adap->stream.user_priv = adap; - - /* resolve USB stream configuration for buffer alloc */ - if (adap->dev->props->get_usb_stream_config) { - ret = adap->dev->props->get_usb_stream_config(NULL, - &stream_props); - if (ret < 0) - return ret; - } else { - stream_props = adap->props->stream; - } - - /* FIXME: can be removed as set later in anyway */ adap->stream.complete = dvb_usb_data_complete; - return usb_urb_initv2(&adap->stream, &stream_props); + return usb_urb_initv2(&adap->stream, &adap->props->stream); } int dvb_usbv2_adapter_stream_exit(struct dvb_usb_adapter *adap) { + pr_debug("%s: adap=%d\n", __func__, adap->id); usb_urb_exitv2(&adap->stream); + return 0; } @@ -133,6 +122,8 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) /* resolve USB stream configuration */ if (adap->dev->props->get_usb_stream_config) { + memcpy(&stream_props, &adap->props->stream, + sizeof(struct usb_data_stream_properties)); ret = adap->dev->props->get_usb_stream_config( adap->fe[adap->active_fe], &stream_props); diff --git a/trunk/drivers/media/dvb/dvb-usb/usb_urb.c b/trunk/drivers/media/dvb/dvb-usb/usb_urb.c index 16e9fa03c847..32e80be2168d 100644 --- a/trunk/drivers/media/dvb/dvb-usb/usb_urb.c +++ b/trunk/drivers/media/dvb/dvb-usb/usb_urb.c @@ -306,7 +306,7 @@ int usb_urb_reconfig(struct usb_data_stream *stream, } int usb_urb_initv2(struct usb_data_stream *stream, - struct usb_data_stream_properties *props) + const struct usb_data_stream_properties *props) { int ret;