serial: asc: Conditionally use readl_relaxed (COMPILE_TEST)
authorDaniel Thompson <daniel.thompson@linaro.org>
Tue, 23 Sep 2014 07:31:30 +0000 (08:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Sep 2014 01:49:48 +0000 (21:49 -0400)
Commit 08177ece596c ("serial: asc: Adopt readl_/writel_relaxed()) is
regressing the m68k allmodconfig build. This is due to the unconditional
use of readl_relaxed() which, although documented, does not currently
exist for m68k.

This is trivially fixable for st-asc because we can just update the
asc_in() accessor to make this conditional.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/st-asc.c

index a3fc1678d2b96c1738b859ca6cfe4984929fda6b..a3165842ca297c6f2bad2750a6eb644b9cf7cc5e 100644 (file)
@@ -151,7 +151,11 @@ static inline struct asc_port *to_asc_port(struct uart_port *port)
 
 static inline u32 asc_in(struct uart_port *port, u32 offset)
 {
+#ifdef readl_relaxed
        return readl_relaxed(port->membase + offset);
+#else
+       return readl(port->membase + offset);
+#endif
 }
 
 static inline void asc_out(struct uart_port *port, u32 offset, u32 value)