Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1528
b: refs/heads/master
c: b16760b
h: refs/heads/master
v: v3
  • Loading branch information
Sergey Vlasov authored and Jaroslav Kysela committed May 29, 2005
1 parent a030fd9 commit ae4fad5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee7333970bee3e7565feeb3edfef4db81cbe72e5
refs/heads/master: b16760bbb9e3c63b6beef7e2c8f8db64ab5efe70
4 changes: 2 additions & 2 deletions trunk/sound/pci/ac97/ac97_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ int snd_ac97_get_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * u
struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value;
unsigned short val, bitmask;

for (bitmask = 1; bitmask > e->mask; bitmask <<= 1)
for (bitmask = 1; bitmask < e->mask; bitmask <<= 1)
;
val = snd_ac97_read_cache(ac97, e->reg);
ucontrol->value.enumerated.item[0] = (val >> e->shift_l) & (bitmask - 1);
Expand All @@ -482,7 +482,7 @@ int snd_ac97_put_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * u
unsigned short val;
unsigned short mask, bitmask;

for (bitmask = 1; bitmask > e->mask; bitmask <<= 1)
for (bitmask = 1; bitmask < e->mask; bitmask <<= 1)
;
if (ucontrol->value.enumerated.item[0] > e->mask - 1)
return -EINVAL;
Expand Down

0 comments on commit ae4fad5

Please sign in to comment.