lkml.org 
[lkml]   [2013]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 07/30] tty: serial/samsung: fix modular build
    Date
    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>
    Cc: linux-serial@vger.kernel.org
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/tty/serial/samsung.c | 4 ++--
    drivers/tty/serial/samsung.h | 4 +++-
    2 files changed, 5 insertions(+), 3 deletions(-)

    diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
    index 729a60d..a3277ca 100644
    --- a/drivers/tty/serial/samsung.c
    +++ b/drivers/tty/serial/samsung.c
    @@ -894,7 +894,7 @@ console_initcall(s3c24xx_serial_console_init);
    #define S3C24XX_SERIAL_CONSOLE NULL
    #endif

    -#ifdef CONFIG_CONSOLE_POLL
    +#if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE) && defined(CONFIG_CONSOLE_POLL)
    static int s3c24xx_serial_get_poll_char(struct uart_port *port);
    static void s3c24xx_serial_put_poll_char(struct uart_port *port,
    unsigned char c);
    @@ -918,7 +918,7 @@ static struct uart_ops s3c24xx_serial_ops = {
    .request_port = s3c24xx_serial_request_port,
    .config_port = s3c24xx_serial_config_port,
    .verify_port = s3c24xx_serial_verify_port,
    -#ifdef CONFIG_CONSOLE_POLL
    +#if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE) && defined(CONFIG_CONSOLE_POLL)
    .poll_get_char = s3c24xx_serial_get_poll_char,
    .poll_put_char = s3c24xx_serial_put_poll_char,
    #endif
    diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h
    index 1a4bca3..00a499e 100644
    --- a/drivers/tty/serial/samsung.h
    +++ b/drivers/tty/serial/samsung.h
    @@ -76,7 +76,9 @@ struct s3c24xx_uart_port {
    #define wr_regb(port, reg, val) __raw_writeb(val, portaddr(port, reg))
    #define wr_regl(port, reg, val) __raw_writel(val, portaddr(port, reg))

    -#ifdef CONFIG_SERIAL_SAMSUNG_DEBUG
    +#if defined(CONFIG_SERIAL_SAMSUNG_DEBUG) && \
    + defined(CONFIG_DEBUG_LL) && \
    + !defined(MODULE)

    extern void printascii(const char *);

    --
    1.8.1.2


    \
     
     \ /
      Last update: 2013-04-11 04:41    [W:3.826 / U:0.204 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site