Skip to contentSkip to conversation

drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift

PATCH New Mauro Carvalho Chehab 1 participant 1 message Jan 6, 2013 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift

Not sure what happened, but this patch didn't arrive linux-media.

Let me forward.

Regards,
Mauro

Forwarded message:

Date: Sat, 5 Jan 2013 14:13:05 -0500
From: Nickolai Zeldovich <[email protected]>
To: Mauro Carvalho Chehab <[email protected]>
Cc: Nickolai Zeldovich <[email protected]>, [email protected], [email protected]
Subject: [PATCH] drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift

Fix bug introduced in 7757ddda6f4febbc52342d82440dd4f7a7d4f14f, where instead of bit-negating the bitmask, the bit position was bit-negated instead.

---
 drivers/media/usb/dvb-usb/dib0700_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/dvb-usb/dib0700_core.c +1 -1
index 19b5ed2..92e195a 100644
@@ -587,7 +587,7 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
 		if (onoff)
 			st->channel_state |=	1 << (adap->id);
 		else
-			st->channel_state |=	1 << ~(adap->id);
+			st->channel_state &=  ~(1 << (adap->id));
 	} else {
 		if (onoff)
 			st->channel_state |=	1 << (adap->fe_adap[0].stream.props.endpoint-2);
Signature · 8 lines
1.7.10.4



-- 

Cheers,
Mauro