Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fe688f1 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab
Browse files

[media] dvb_usb_v2: call streaming_ctrl() before kill urbs



Logically it is better ask hardware to stop streaming before
killing urbs carrying stream. Earlier it was just opposite.
Now code runs:
* submit urbs
* start streaming
** streaming ongoing **
* stop streaming
* kill urbs

Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6332059e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -265,7 +265,6 @@ static inline int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed,
	/* stop feeding if it is last pid */
	if (adap->feed_count == 0) {
		dev_dbg(&d->udev->dev, "%s: stop feeding\n", __func__);
		usb_urb_killv2(&adap->stream);

		if (d->props->streaming_ctrl) {
			ret = d->props->streaming_ctrl(
@@ -274,9 +273,11 @@ static inline int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed,
				dev_err(&d->udev->dev, "%s: streaming_ctrl() " \
						"failed=%d\n", KBUILD_MODNAME,
						ret);
				usb_urb_killv2(&adap->stream);
				goto err_mutex_unlock;
			}
		}
		usb_urb_killv2(&adap->stream);
		mutex_unlock(&adap->sync_mutex);
	}