From patchwork Thu Jun 13 13:49:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan Le Ray X-Patchwork-Id: 166672 Delivered-To: patch@linaro.org Received: by 2002:ac9:2a84:0:0:0:0:0 with SMTP id p4csp797579oca; Thu, 13 Jun 2019 08:11:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+acf9ENbGqnH2DZspxvfXrlu0Qn5V1Nkd/b+h/p77nj1/tJL1AaXkOKgx0HGO1tUqnJBH X-Received: by 2002:a17:902:9885:: with SMTP id s5mr11061141plp.102.1560438715636; Thu, 13 Jun 2019 08:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560438715; cv=none; d=google.com; s=arc-20160816; b=XI+QJpftLGJixu3k8kkI6r0po/IypuU0ErqFbpN72G4bOMsH2ACeRGNStR1tAgJcYm I+AbJp3qih1ARYOtF+kcSpibabrE2XTH1mN5l1sT9/kSrGGIehOpmB749X4lHyVlHrfN ILnapXoZFmCAr5YbTV7mVyYmjYmgU5bW9fygEkB6ffDBmVAW5zTdt/lKLsOVlSoPpXFD kolX2AEW0rbfYMNb1AWeyHPY+XB4PLz6OEH0D8NtY3hJIIAAsKVCCxT9DWwKyxj4jSU9 o5zKi+80kZ0/YI3MYkMVOYtfb22fWcUmy4v2GDAmhk9Q4VMVLfuYTfC4BVsIOUTCCpMG xDgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hQPL1lSMiaGkXN0tX+iDbilLpKHlu0ZCPZ1hRbTVk9w=; b=FJoqrlD27P8vREwYEYc7WYOMv/79uWUy8KsLr87W7UZlL9Mv9b7J1x1E8OxZSeEdYy f9tLFGwU7IyqiR1zvUAfF47ZBdML9TLj+C0LljlR2+qx1voPR0RD6LI2O/fPKhhqWa2w Y4ABJdcgp2VOLImhM4mpDGY4ACIaZPHG2/D4zzdmNPt5g3T/4cqpPUfZfwzOPBA+dQ4u BTWCbofgIwKL2F38btt28zLvq/3i6bIGERQf/I+0ZIixuYm8xqy9dTMzKgY9iIb7KCQs Pay79daBbN0ZMaE76gTBFA99sVXfrZrdI7IsG2BNhFTClzUGpIy9dLIIphwIfB1zVtwj Nvzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=N8YIAF1P; 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 5si3569542pfv.231.2019.06.13.08.11.54; Thu, 13 Jun 2019 08:11:55 -0700 (PDT) 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=pass header.i=@st.com header.s=STMicroelectronics header.b=N8YIAF1P; 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 S2388082AbfFMPLy (ORCPT + 25 others); Thu, 13 Jun 2019 11:11:54 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:48750 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732292AbfFMNuc (ORCPT ); Thu, 13 Jun 2019 09:50:32 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5DDkxMa019851; Thu, 13 Jun 2019 15:50:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=hQPL1lSMiaGkXN0tX+iDbilLpKHlu0ZCPZ1hRbTVk9w=; b=N8YIAF1P1bqRtbJy25ruaHW0ZwzsImWsUZJYeuANBy0tsRU58dDRTrvOw1SUG/nru9HF dNi92tp3tUHseNk5L29C9/3jOFln2YWqFQh+LzXDFbkczNjcYV7SyG2H+byVb6s4SAtb lsQUBcVzIYn+k8v8iRA1T/erQYO+/habJJXNoTuI26i0cB58V3qHaupVPxe53QjvGfUf B+WaaopZapOE4RQn9d/FRf4o/Hd/c00VV+XTS6lqz+X9PcABfu4U27KsEXpcOuac2jCB lvpFx1xoWDoG4KxsRPN7EC+0q+NoR4esotnImXLu98PbjFJU0DsDcN90i/hBmAua0Vri Og== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2t2gxec01h-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 13 Jun 2019 15:50:19 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 83FEA42; Thu, 13 Jun 2019 13:50:18 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4A5762BE1; Thu, 13 Jun 2019 13:50:18 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 13 Jun 2019 15:50:18 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 13 Jun 2019 15:50:17 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" CC: , , , , , Erwan Le Ray , "Fabrice Gasnier" Subject: [PATCH v3 05/10] serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP Date: Thu, 13 Jun 2019 15:49:55 +0200 Message-ID: <1560433800-12255-6-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1560433800-12255-1-git-send-email-erwan.leray@st.com> References: <1560433800-12255-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-13_08:, , signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use __maybe_unused for power management related functionsinstead of fixes: 270e5a74fe4c ("serial: stm32: add wakeup mechanism") Signed-off-by: Erwan Le Ray -- 1.9.1 diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 41898c4..b0fb420 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -1276,8 +1276,8 @@ static int stm32_console_setup(struct console *co, char *options) .cons = STM32_SERIAL_CONSOLE, }; -#ifdef CONFIG_PM_SLEEP -static void stm32_serial_enable_wakeup(struct uart_port *port, bool enable) +static void __maybe_unused stm32_serial_enable_wakeup(struct uart_port *port, + bool enable) { struct stm32_port *stm32_port = to_stm32_port(port); struct stm32_usart_offsets *ofs = &stm32_port->info->ofs; @@ -1301,7 +1301,7 @@ static void stm32_serial_enable_wakeup(struct uart_port *port, bool enable) } } -static int stm32_serial_suspend(struct device *dev) +static int __maybe_unused stm32_serial_suspend(struct device *dev) { struct uart_port *port = dev_get_drvdata(dev); @@ -1317,7 +1317,7 @@ static int stm32_serial_suspend(struct device *dev) return 0; } -static int stm32_serial_resume(struct device *dev) +static int __maybe_unused stm32_serial_resume(struct device *dev) { struct uart_port *port = dev_get_drvdata(dev); @@ -1328,7 +1328,6 @@ static int stm32_serial_resume(struct device *dev) return uart_resume_port(&stm32_usart_driver, port); } -#endif /* CONFIG_PM_SLEEP */ static int __maybe_unused stm32_serial_runtime_suspend(struct device *dev) {