Skip to content

Commit

Permalink
Revert "[media] drivers/media/usb/dvb-usb/dib0700_core.c: fix left sh…
Browse files Browse the repository at this point in the history
…ift"

On Wed, 6 Feb 2013 09:04:39 +0000
Olivier GRENIE <olivier.grenie@parrot.com> wrote:

> I do not agree with the patch. Let's take an example: adap->id = 0. Then:
> 	* 1 << ~(adap->id) = 1 << ~(0) = 0
> 	* ~(1 << adap->id) = ~(1 << 0) = 0xFE
>
> The correct change should be: st->channel_state |= 1 << (1 - adap->id); Indeed, the original source code was not correct.

Requested-by: Olivier GRENIE <olivier.grenie@parrot.com>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Cc: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Feb 6, 2013
1 parent 6a05d66 commit f85ed0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/dvb-usb/dib0700_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,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);
Expand Down

0 comments on commit f85ed0c

Please sign in to comment.