aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-10 20:04:49 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 16:14:37 -0400
commit84f57d9e3685500a7447fc09a6891ce218869174 (patch)
tree20ca794a77ac0a2ec79d9507369bbd9cf95ae62b
parent9ee51f01eee84a108510ac2794b9a9dff8be6d3f (diff)
tty: serial/samsung: fix modular build
There are a few bugs in the samsung serial driver when built as a loadable module, which makes the console code unavailable, as well as giving no access to the 'printascii' early debug function. This adds the appropriate compile time conditionals. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/samsung.c4
-rw-r--r--drivers/tty/serial/samsung.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 6a3695681fa5..074b9194144f 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -898,7 +898,7 @@ console_initcall(s3c24xx_serial_console_init);
898#define S3C24XX_SERIAL_CONSOLE NULL 898#define S3C24XX_SERIAL_CONSOLE NULL
899#endif 899#endif
900 900
901#ifdef CONFIG_CONSOLE_POLL 901#if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE) && defined(CONFIG_CONSOLE_POLL)
902static int s3c24xx_serial_get_poll_char(struct uart_port *port); 902static int s3c24xx_serial_get_poll_char(struct uart_port *port);
903static void s3c24xx_serial_put_poll_char(struct uart_port *port, 903static void s3c24xx_serial_put_poll_char(struct uart_port *port,
904 unsigned char c); 904 unsigned char c);
@@ -922,7 +922,7 @@ static struct uart_ops s3c24xx_serial_ops = {
922 .request_port = s3c24xx_serial_request_port, 922 .request_port = s3c24xx_serial_request_port,
923 .config_port = s3c24xx_serial_config_port, 923 .config_port = s3c24xx_serial_config_port,
924 .verify_port = s3c24xx_serial_verify_port, 924 .verify_port = s3c24xx_serial_verify_port,
925#ifdef CONFIG_CONSOLE_POLL 925#if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE) && defined(CONFIG_CONSOLE_POLL)
926 .poll_get_char = s3c24xx_serial_get_poll_char, 926 .poll_get_char = s3c24xx_serial_get_poll_char,
927 .poll_put_char = s3c24xx_serial_put_poll_char, 927 .poll_put_char = s3c24xx_serial_put_poll_char,
928#endif 928#endif
diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h
index 1a4bca3e4179..00a499ecd385 100644
--- a/drivers/tty/serial/samsung.h
+++ b/drivers/tty/serial/samsung.h
@@ -76,7 +76,9 @@ struct s3c24xx_uart_port {
76#define wr_regb(port, reg, val) __raw_writeb(val, portaddr(port, reg)) 76#define wr_regb(port, reg, val) __raw_writeb(val, portaddr(port, reg))
77#define wr_regl(port, reg, val) __raw_writel(val, portaddr(port, reg)) 77#define wr_regl(port, reg, val) __raw_writel(val, portaddr(port, reg))
78 78
79#ifdef CONFIG_SERIAL_SAMSUNG_DEBUG 79#if defined(CONFIG_SERIAL_SAMSUNG_DEBUG) && \
80 defined(CONFIG_DEBUG_LL) && \
81 !defined(MODULE)
80 82
81extern void printascii(const char *); 83extern void printascii(const char *);
82 84