summaryrefslogtreecommitdiff
path: root/drivers/staging/meilhaus/me4600_ao.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-12-24 16:23:37 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:27 -0700
commit530ddf8563df4d7af8f8bdd99fa478c63805d0e3 (patch)
treee2b59daa26eac933b29a653ac56f9154f4754c64 /drivers/staging/meilhaus/me4600_ao.c
parentc6f5af88438b3e22d56a6b2aafaee5ffc4bc030e (diff)
Staging: meilhaus: Correct use of ! and &
ME_IO_SINGLE_TYPE_WRITE_NONBLOCKING and ME_IO_STREAM_CONFIG_WRAPAROUND both hanve 0 as the rightmost bit, and thus eg !flags & ME_IO_SINGLE_TYPE_WRITE_NONBLOCKING is always 0. I assume that !(flags & ME_IO_SINGLE_TYPE_WRITE_NONBLOCKING) and !(flags & ME_IO_STREAM_CONFIG_WRAPAROUND) were intended. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E; constant C; @@ ( !E & !C | - !E & C + !(E & C) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/meilhaus/me4600_ao.c')
-rw-r--r--drivers/staging/meilhaus/me4600_ao.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/meilhaus/me4600_ao.c b/drivers/staging/meilhaus/me4600_ao.c
index e2bec8229abd..2571caf7530c 100644
--- a/drivers/staging/meilhaus/me4600_ao.c
+++ b/drivers/staging/meilhaus/me4600_ao.c
@@ -1025,7 +1025,7 @@ static int me4600_ao_io_stream_config(me_subdevice_t * subdevice,
}
if (flags & ME_IO_STREAM_CONFIG_HARDWARE_ONLY) {
- if (!flags & ME_IO_STREAM_CONFIG_WRAPAROUND) {
+ if (!(flags & ME_IO_STREAM_CONFIG_WRAPAROUND)) {
PERROR
("Hardware ME_IO_STREAM_CONFIG_HARDWARE_ONLY has to be with ME_IO_STREAM_CONFIG_WRAPAROUND.\n");
return ME_ERRNO_INVALID_FLAGS;