summaryrefslogtreecommitdiff
path: root/drivers/serial/ns16550.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/ns16550.c')
-rw-r--r--drivers/serial/ns16550.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index eb00f1ca8a..03beab5a14 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -80,7 +80,7 @@ static inline int serial_in_shift(unsigned char *addr, int shift)
#elif defined(CONFIG_SYS_NS16550_MEM32) && defined(CONFIG_SYS_BIG_ENDIAN)
return in_be32(addr);
#elif defined(CONFIG_SYS_BIG_ENDIAN)
- return readb(addr + (1 << reg_shift) - 1);
+ return readb(addr + (1 << shift) - 1);
#else
return readb(addr);
#endif