summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-sf16fmr2.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-22 13:07:17 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-10-14 06:23:38 -0300
commitb5c2e0abe1d0ffc367d0c1a42e45c91c079838d3 (patch)
tree7ff0e524db0403b7a88147ed3440bf26ef027948 /drivers/media/radio/radio-sf16fmr2.c
parent8510ae4e57b74f5da4a2d98508689ede569c8221 (diff)
downloadlinux-b5c2e0abe1d0ffc367d0c1a42e45c91c079838d3.tar.bz2
[media] snd_tea575x: precedence bug in fmr2_tea575x_get_pins()
The "|" operation has higher precedence that "?:" so this couldn't return both flags set at once as intended. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/radio/radio-sf16fmr2.c')
-rw-r--r--drivers/media/radio/radio-sf16fmr2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index f1e3714b5f16..620c4907e701 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -74,8 +74,8 @@ static u8 fmr2_tea575x_get_pins(struct snd_tea575x *tea)
struct fmr2 *fmr2 = tea->private_data;
u8 bits = inb(fmr2->io);
- return (bits & STR_DATA) ? TEA575X_DATA : 0 |
- (bits & STR_MOST) ? TEA575X_MOST : 0;
+ return ((bits & STR_DATA) ? TEA575X_DATA : 0) |
+ ((bits & STR_MOST) ? TEA575X_MOST : 0);
}
static void fmr2_tea575x_set_direction(struct snd_tea575x *tea, bool output)