summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/calypso/uart.c
diff options
context:
space:
mode:
authorAlex Badea <vamposdecampos@gmail.com>2010-11-17 23:35:17 +0200
committerHarald Welte <laforge@gnumonks.org>2010-11-17 23:39:46 +0100
commitd45476dad9da376d51dd93ff4899512dfd3cce16 (patch)
tree6ffbf56012272a6fd4d7c127c52509fbe050aff0 /src/target/firmware/calypso/uart.c
parent4ad8b730a0f09fae020e2cf13fdbf301c1e2aec9 (diff)
target uart: remove REG_OFFS() macro side-effect
Don't assign to the variable given as argument. This prevents clobbering the local 'reg' variables in uart_reg_{read,write}(), which would in turn prevent the latch bits from being restored correctly. Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
Diffstat (limited to 'src/target/firmware/calypso/uart.c')
-rw-r--r--src/target/firmware/calypso/uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/firmware/calypso/uart.c b/src/target/firmware/calypso/uart.c
index 4d7df092..394078de 100644
--- a/src/target/firmware/calypso/uart.c
+++ b/src/target/firmware/calypso/uart.c
@@ -43,7 +43,7 @@
#define LCR7BIT 0x80
#define LCRBFBIT 0x40
#define MCR6BIT 0x20
-#define REG_OFFS(m) ((m) &= ~(LCR7BIT|LCRBFBIT|MCR6BIT))
+#define REG_OFFS(m) ((m) & ~(LCR7BIT|LCRBFBIT|MCR6BIT))
/* read access LCR[7] = 0 */
enum uart_reg {
RHR = 0,