Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3792337imu; Tue, 18 Dec 2018 04:21:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/XOaBLIvizr/dMAXlB5BTKmD9nHfbAyesq3jBFXELj4c8+3+2tq9OscJEOxqcrZZBBrKmac X-Received: by 2002:a63:3602:: with SMTP id d2mr15211226pga.404.1545135705533; Tue, 18 Dec 2018 04:21:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545135705; cv=none; d=google.com; s=arc-20160816; b=ZgZkHiNg2Ah1xvxoLa/bzMiso0rmn7fIZ1f+OoUT0M6JIQxEUhrDTBcUb0V3ylY/OP KsnokxfXDo06kUdMYkiFE90cthYwMC6xSK308eXKHVI4LDRiOVsp4unaRCaCqanXyH3k XxqtxdBniSsUfgVDJ9ZJpWIwhdFMqPBKc9PF9fHkFqXa+4TVYNRnI/8/qeBvWS8ZxzH+ BwDib6Mv7Vh4as6HGpNF+cU8ZftjUFf3RFn5s+A1CVjXudjIKMnf17VhKdCOmxBTW1X1 r1C/MCr/uVwR5BbtjhGjpEWqLct4S87w9/orWrTY1+WHQ5RKLy0QWMmDHAcTc28ERY4C Mwgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=sr4wuOWXsEDaIHmkdgp5/mtEUfBN4wQ+UuMd8Oge7B4=; b=fJf4f73gpCkb+kpJ7VQ5icjgS8OarL+zq6pz2LYHZVjiBHrmCS66/VhqbIOswaElpU DFo/Um7w9Xl5dbHyTXoAYBlooVUbpoPN6xJUUEXmDpg4Ioe9Z+/gu1VTt/3a4A7D19Hk oSY5ItN/6VJosXdu1ffQ/UghLCyJ7bhDbow/EjOWDrtllvaNB9BjGIpWmGL66pYXafJC lSay8rBN7bigY5ebevq9AHhAmyfzyvVrFbSKy+kPjHAwXKFaffpCAO2TKM5HfEMqFYSx 0JxZ23Y3A2b4TEPFAekIZh1HLSuHnnA+jq3EjJJD/N747x34JOo2YFTZsrrZ1rrpFmQJ dNIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=EqZdGbpN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6si12658627plz.316.2018.12.18.04.21.30; Tue, 18 Dec 2018 04:21:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=EqZdGbpN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726780AbeLRMTI (ORCPT + 99 others); Tue, 18 Dec 2018 07:19:08 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33813 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726633AbeLRMSw (ORCPT ); Tue, 18 Dec 2018 07:18:52 -0500 Received: by mail-wr1-f68.google.com with SMTP id j2so15712351wrw.1 for ; Tue, 18 Dec 2018 04:18:51 -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:in-reply-to:references :in-reply-to:references; bh=sr4wuOWXsEDaIHmkdgp5/mtEUfBN4wQ+UuMd8Oge7B4=; b=EqZdGbpNUKx1T/vwDwk3desDmKTHP2e28GVlgVSY4w3rfP2d5HecQH+DYwRsvXSaa4 gR3blQRULTvGOsOh6gKGHfmTg10TZ2iJpOTYymZuNyU3Q47iWOPKubvcx9voiVtyOyTe 8fyRpPsXBLXgVSFN0TKLiDPcqVegcxdYuYGv6tpxv/FiZzf2KGFEvWZ2cSsP1p/8xnOU BIDRdKUHtHP0ZCBFo6lQD2QUtMItAHlTSUmdEj1IyduV543TfP9st1nvXRTzA5ZIvSuq qrH88bYKpzBKS1dtK06lfFpALG2rdomM96qTIROEwSgVw9NxVW+QxbKC7UupZW/hW4iK 31Aw== 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 :in-reply-to:references:in-reply-to:references; bh=sr4wuOWXsEDaIHmkdgp5/mtEUfBN4wQ+UuMd8Oge7B4=; b=iQxCc4pyMsS6sDwk0reMwJVwpJ4UuJC+efwMZZEHMXhdNQmy5UoDNi2mivCB3b/l36 JSAaPTuDLD2q1tBnxfY0FdjL5re1skxc+tJ2hy5AHe/2jioqzMsiHaiHFoxqp7Fw39rY mgrm5O145wWaod0x6Y6ddmcYLG3fgrFPH8aoPjTv0+Cqr3vNom2OCYUmyjIlx9KNPKzR xxTUyI0qTtk1SSf5Bs/bTSNk9EtAkwOxDqLjGgN02viNcgwCeOV8vZXjCt5ZK/IcXyl4 1bB9ZC5QuU7DAMPFPPZcXRqURfhcQzB/GQEsnCCNE5io9XWGDgbLpgPf9fhWmiQlMqJ3 tc8Q== X-Gm-Message-State: AA+aEWbG7lxPKy+G/zlIF2Hy24D0O0kpPBLBzAUgvyCA8LwW1/b8vZ1f eoTLoruLmRRiJzUL9fYiLueVsuh/boIuwg== X-Received: by 2002:a5d:480d:: with SMTP id l13mr15450222wrq.175.1545135530534; Tue, 18 Dec 2018 04:18:50 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id m6sm2594800wrv.24.2018.12.18.04.18.49 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 18 Dec 2018 04:18:49 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, Greg Kroah-Hartman , Shubhrajyoti Datta Cc: Jiri Slaby , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/4] serial: uartps: Check if the device is a console Date: Tue, 18 Dec 2018 13:18:40 +0100 Message-Id: <863488c6f6d7f3d8c53d46f442f25ec2f46ee651.1545135519.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes in v2: None 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); -- 1.9.1