Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488AbbLKBIw (ORCPT ); Thu, 10 Dec 2015 20:08:52 -0500 Received: from seldrel01.sonyericsson.com ([37.139.156.2]:3515 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543AbbLKBIu (ORCPT ); Thu, 10 Dec 2015 20:08:50 -0500 From: Bjorn Andersson To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring CC: , Subject: [PATCH] serial: earlycon: Initialize uart_port spinlock Date: Thu, 10 Dec 2015 17:08:46 -0800 Message-ID: <1449796126-14906-1-git-send-email-bjorn.andersson@sonymobile.com> X-Mailer: git-send-email 2.4.2 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1278 Lines: 37 Initialize the uart_port spinlock of earlycon to avoid the BUG() when booting with spinlock debug enabled. Signed-off-by: Bjorn Andersson --- drivers/tty/serial/earlycon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index f09636083426..6c18891ad8d0 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c @@ -111,6 +111,8 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match) int err; struct uart_port *port = &early_console_dev.port; + spin_lock_init(&port->lock); + /* On parsing error, pass the options buf to the setup function */ if (buf && !parse_options(&early_console_dev, buf)) buf = NULL; @@ -202,6 +204,7 @@ int __init of_setup_earlycon(unsigned long addr, int err; struct uart_port *port = &early_console_dev.port; + spin_lock_init(&port->lock); port->iotype = UPIO_MEM; port->mapbase = addr; port->uartclk = BASE_BAUD * 16; -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/