From patchwork Wed Dec 5 13:20:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 10714179 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80F62109C for ; Wed, 5 Dec 2018 13:21:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CC1F2CEEE for ; Wed, 5 Dec 2018 13:21:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 609E62CEEC; Wed, 5 Dec 2018 13:21:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3D7412CC4F for ; Wed, 5 Dec 2018 13:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=MsLD5IZbiOLZKZFBxJB4fe9UrO92luYmThRMUfQo65A=; b=QMS Yei3H+n/6pn6wUoXw9Rq2sUK9RwkMb6KMMvPk+PPShjmDW0FSDdhmtYFxTjihfMSuPFgdi3fo6nrx N89lmeeBYtRe8qI8WlzGWWikR/sNitqem0Qx116KPSqmsOVpygwHb74X+u/rcUjiAk4B1jI5eYyo5 DAkZJCQlVHMVVibV397Hxu0sO8SpYqT/foU9/R4SrYCteWkV+dlrZewE0e6kOFXlN9ZydxS8tojVR 5MqEnA8ne9GTaIgcBYEUxOfMbKlX7ZC/l+eRBpnTkxnu6Ehm9q3MPilDeNXCRQyNeNpod0ezCHTsG SSKkpEoHJdxqyN3z38Icn/1lN8WWEIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUX6k-0003fW-4A; Wed, 05 Dec 2018 13:20:54 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUX6h-0003NS-F7 for linux-arm-kernel@lists.infradead.org; Wed, 05 Dec 2018 13:20:52 +0000 Received: by mail-wr1-x441.google.com with SMTP id b14so6075421wru.12 for ; Wed, 05 Dec 2018 05:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=gcRaEiI2nC450w3C4tg9ZcO2U8hEoUurJuHUy1B1tnA=; b=nh9fJbbPfMM+03IQICApNkluLYl9gRxhI1R5pdJJ1PgLLgQIYKb3To1l5vmpdtlxz/ H5SjLtCT1i9rtirb2iUlqE3KcYgai+2W9zBqJhyuY83UhrOJDaso+x63EfEJM5Q3wpjj dT29NlmMILIP5OVgAayThZBCxgLXIBU9CzGFfVYXUSS2ly5KSyiH7t+wEBvbXqyf9obM HkQKZAim31IGNUGCHP5KtFoqC1JEunJeM6/ezMAOzxEfyuDYmwhg4wzqSnt3RRoptCMs dypCG3IMRgxXGfxUbQD/fH2EhWeLbcYfjDrjZPgGzvPf0vGU+XOzWF5G4+emozHwXbF8 QGhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=gcRaEiI2nC450w3C4tg9ZcO2U8hEoUurJuHUy1B1tnA=; b=D1mRptEU/r6PnNZMAa7oJ8ZHuncMxmE4pg6AOVS5Fd08Onl1HE7WJOFy7aSP8Opyzp IydHs7v7PjUx/oIQagCHBy/cMq/J3It0Qz6Cc7PvbQ0/SnJ0RyntasQ9yvAZQZoL8g5I n8wckYIZCU+zt9MF4IxdmjVuSUi91XFzsYo1O15HrruLUjHZs1GndoF2oabUeU2tNAqU BadQLLIiv1o0rLMAgFRNy6paS6xt8O4U+NzrtMHZC5pZNj3Gjn0A0NU60CYNyAaVMOI9 iWRgrVwJg4oWL40Aw3KRkyFEZcuKtMM8goVLbdd3lAn2mLQdKieZQfzoLTmnn8w4F4bz Bclg== X-Gm-Message-State: AA+aEWaOULzcWF5UAUO+y2X9zbFeLcSyXCOshpRLVOBB61C21gAxEbRs mZC8HrixlwU2b8v0hOqXjAI8yw== X-Google-Smtp-Source: AFSGD/Wmots0zroiwZ1vgBo9yJOj/elNLlX0Yh62PsRqEOeEb0YgQygZdagqNvYUfhGmDL68kiT+nw== X-Received: by 2002:adf:9521:: with SMTP id 30mr20586373wrs.192.1544016039444; Wed, 05 Dec 2018 05:20:39 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id g188sm13552096wmf.32.2018.12.05.05.20.38 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 05 Dec 2018 05:20:38 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, Greg Kroah-Hartman , Shubhrajyoti Datta Subject: [PATCH] serial: uartps: Check if the device is a console Date: Wed, 5 Dec 2018 14:20:38 +0100 Message-Id: X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181205_052051_509238_95984A31 X-CRM114-Status: GOOD ( 12.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Jiri Slaby MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shubhrajyoti Datta While checking for console_suspend_enabled also check if the device is a console. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- drivers/tty/serial/xilinx_uartps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 0140644391df..9cdc36be5b13 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1255,7 +1255,7 @@ static int cdns_uart_suspend(struct device *device) may_wake = device_may_wakeup(device); - if (console_suspend_enabled && may_wake) { + if (console_suspend_enabled && uart_console(port) && may_wake) { unsigned long flags = 0; spin_lock_irqsave(&port->lock, flags); @@ -1293,7 +1293,7 @@ static int cdns_uart_resume(struct device *device) may_wake = device_may_wakeup(device); - if (console_suspend_enabled && !may_wake) { + if (console_suspend_enabled && uart_console(port) && !may_wake) { clk_enable(cdns_uart->pclk); clk_enable(cdns_uart->uartclk);