Fix some incorrect testing of bit flags.
This commit is contained in:
parent
310876dcec
commit
2db33d5c8c
2 changed files with 7 additions and 7 deletions
|
@ -172,8 +172,8 @@ PRIVATE int get_set_input(struct inout_ctrl *input, int flag, int channel) {
|
|||
mixer_set(input_cmd, mask);
|
||||
} else { /* Get input */
|
||||
if (shift > 0) {
|
||||
input->left = ((mask >> (shift+1)) & 1 == 1 ? ON : OFF);
|
||||
input->right = ((mask >> shift) & 1 == 1 ? ON : OFF);
|
||||
input->left = (((mask >> (shift+1)) & 1) == 1 ? ON : OFF);
|
||||
input->right = (((mask >> shift) & 1) == 1 ? ON : OFF);
|
||||
} else {
|
||||
input->left = ((mask & 1) == 1 ? ON : OFF);
|
||||
}
|
||||
|
@ -220,8 +220,8 @@ PRIVATE int get_set_output(struct inout_ctrl *output, int flag) {
|
|||
mixer_set(MIXER_OUTPUT_CTRL, mask);
|
||||
} else { /* Get input */
|
||||
if (shift > 0) {
|
||||
output->left = ((mask >> (shift+1)) & 1 == 1 ? ON : OFF);
|
||||
output->right = ((mask >> shift) & 1 == 1 ? ON : OFF);
|
||||
output->left = (((mask >> (shift+1)) & 1) == 1 ? ON : OFF);
|
||||
output->right = (((mask >> shift) & 1) == 1 ? ON : OFF);
|
||||
} else {
|
||||
output->left = ((mask & 1) == 1 ? ON : OFF);
|
||||
}
|
||||
|
@ -250,4 +250,4 @@ PUBLIC int mixer_get(int reg) {
|
|||
sb16_outb(MIXER_REG, reg);
|
||||
for(i = 0; i < 100; i++);
|
||||
return sb16_inb(MIXER_DATA) & 0xff;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1482,7 +1482,7 @@ int vectored;
|
|||
goto suspend;
|
||||
}
|
||||
|
||||
if (!rfd_status & RFDS_OK)
|
||||
if (!(rfd_status & RFDS_OK))
|
||||
{
|
||||
/* Not OK? What happened? */
|
||||
assert(0);
|
||||
|
@ -1662,7 +1662,7 @@ int from_int;
|
|||
goto suspend;
|
||||
}
|
||||
|
||||
if (!rfd_status & RFDS_OK)
|
||||
if (!(rfd_status & RFDS_OK))
|
||||
{
|
||||
/* Not OK? What happened? */
|
||||
assert(0);
|
||||
|
|
Loading…
Reference in a new issue