summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-09-26 21:51:28 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-11-19 16:24:07 +0000
commitc50fdd1546ea1f3e085a955ab553008e8eb4d6a3 (patch)
tree11e25f8a975ba6c58293e1ed27041b8703383205
parente08d8f0fadad540ecd134724a7d6b519823e4637 (diff)
media: dib0700: Only touch one bit when start/stop an adapter
Only touch the right bit to enable/disable an adapter channel, without touching the other adapter's one. Tested on Nova-TD. Link: https://lore.kernel.org/linux-media/4214942f248baddec9cfd2b4b2424993ac356a51.1632689033.git.mchehab+huawei@kernel.org Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Michael Kuron <michael.kuron@gmail.com>, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, pb@linuxtv.org Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/media/usb/dvb-usb/dib0700_core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c
index d7c5836b9271..1caabb51ea47 100644
--- a/drivers/media/usb/dvb-usb/dib0700_core.c
+++ b/drivers/media/usb/dvb-usb/dib0700_core.c
@@ -610,8 +610,6 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
st->buf[3] = 0x00;
- st->channel_state &= ~0x3;
-
if ((adap->fe_adap[0].stream.props.endpoint != 2)
&& (adap->fe_adap[0].stream.props.endpoint != 3)) {
deb_info("the endpoint number (%i) is not correct, use the adapter id instead\n",
@@ -624,7 +622,7 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
if (onoff)
st->channel_state |= 1 << adapt_nr;
else
- st->channel_state |= 1 << (1 - adapt_nr);
+ st->channel_state &= ~(1 << adapt_nr);
st->buf[2] |= st->channel_state;