]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: au88x0: fix incorrect left shift
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Sat, 5 Jan 2013 19:14:08 +0000 (14:14 -0500)
committerTakashi Iwai <tiwai@suse.de>
Mon, 7 Jan 2013 08:33:56 +0000 (09:33 +0100)
vortex_wt_setdsout performs bit-negation on the bit position (wt&0x1f)
rather than on the resulting bitmask.  This code is never actually
invoked (vortex_wt_setdsout is always called with en=1), so this does
not currently cause any problem, and this patch is simply cleanup.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/au88x0/au88x0_synth.c

index 2805e34bd41d715a44c3ba645165a71295260095..8bef47311e45025aeeb6552054c50dd520a8ad9d 100644 (file)
@@ -58,7 +58,7 @@ static void vortex_wt_setdsout(vortex_t * vortex, u32 wt, int en)
        if (en)
                temp |= (1 << (wt & 0x1f));
        else
-               temp &= (1 << ~(wt & 0x1f));
+               temp &= ~(1 << (wt & 0x1f));
        hwwrite(vortex->mmio, WT_DSREG((wt >= 0x20) ? 1 : 0), temp);
 }