From patchwork Tue Jun 4 08:55:14 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: 165725 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5559792ili; Tue, 4 Jun 2019 01:56:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuy2BdoIbx3nxBsQFAKw0i1YC4IUm667X2CFR/VWp4Rllo6J4HSUSXHShFX8rjpcu15YPe X-Received: by 2002:a62:5587:: with SMTP id j129mr36655603pfb.45.1559638587364; Tue, 04 Jun 2019 01:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559638587; cv=none; d=google.com; s=arc-20160816; b=oUe8qkGAVnsYTsjAAZgBqvWaYBOoHTIFCeHVtP1tbJ/SuA8SCpH4ws64IhXEecNdVK PIRtBVVUsSwum0BAf59d+9cBK3UGXug122MCB7Vi8Nk3NBGjUy6T5unU7PjWvQVOiWME BI1k7LO8wUwE7SZR3Klv27Pn4OMCOYrXl0H2mYQxCtKZAoLeL0qtm6GCiQNKnlgM6prH HsGPTX4PKydcSlzT2Z03L74eRVieNlzepQr+b9yYIlkOn1BCmislmex5JJiUJBqyttMv 2Fhw11Mju8+MUlU0cDSWzbhbi67I8GGwCT/MK+YuXdngEFOEYdLHjHNr99IWom1ROZGb VEHw== 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=2t7Oh2wFwFzhKSRexvanrt3z18l9MjaRhX9ZcdCIqoQ=; b=PE2B10T9KxSqQEVvajCDUBCWRXUFP088JB/JwuRnEZXkuUkNRvQEEniUkHhJ1dczMj tYsjXbWgBq1679+mildfsEGXwBzoUnAlAP2neb4cP6+n1B+yzSfcT+xD3RBM665WveUj BGM1WphwIKca5BE7ncq1huSq3mcGgq0UMrrks/Pie/5AmQQkFk7dXPzp0RhkNbnsDtem TSKclkgw8kdtD/x0TnXwXycRVX5coVMydEHS5+V2/oTglDV+1L6xa73zAXYDpMzIlrLw 3Zf2DHhxDOPdKlPQ5uppTsGEUwWWt9jAz3m8/N4A/fUwSNvQIJH0KGjpndCHghqnZI8J vFtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=zcB+NMK4; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-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 o4si20565318pgg.49.2019.06.04.01.56.27; Tue, 04 Jun 2019 01:56:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-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=zcB+NMK4; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727013AbfFDI40 (ORCPT + 1 other); Tue, 4 Jun 2019 04:56:26 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:52982 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726988AbfFDI40 (ORCPT ); Tue, 4 Jun 2019 04:56:26 -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 x548tKw0021226; Tue, 4 Jun 2019 10:55:56 +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=2t7Oh2wFwFzhKSRexvanrt3z18l9MjaRhX9ZcdCIqoQ=; b=zcB+NMK4ZEKRouNwjVExKEnwxrgxeu2Fil4w6ZZvxebJzxMN5BKsKqqErUlE6i7b3zTa yVTjw4DDtR54Sr+8YnvD3WVjGymrHCuIFR2vsKjBwLjkXJaHwaPnlB+7saNTKdVtA+gq 8PtnXy/xQCwVidJTjNXokBNS5/0BGwceMsdl6GRGtiMSE53dfneX7txHvdry4vvOePsd zVO4S8jU2FkvhrA35rE80HH7oMGW9kBfBz5JE5Q9wb1YlIMMPxD/ATEEhY9YWrOPoNH2 ZV4YHgC7HmgikiFjuPMI/x5odw52oMN8LP1dfOcBLJJ6QMGj7FBHsLcj98p9Gym2xnxi Ww== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sundrynjk-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 10:55:56 +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 8D9E016A; Tue, 4 Jun 2019 08:55:38 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 730242508; Tue, 4 Jun 2019 08:55:38 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:38 +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; Tue, 4 Jun 2019 10:55:36 +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 05/10] serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP Date: Tue, 4 Jun 2019 10:55:14 +0200 Message-ID: <1559638519-6128-6-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-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-04_07:, , signatures=0 Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Use __maybe_unused for power management related functionsinstead of #if CONFIG_PM_SLEEP to simply the code. 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 05d2ef6..aa3da1c 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -1200,8 +1200,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; @@ -1225,7 +1225,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); @@ -1241,7 +1241,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); @@ -1252,7 +1252,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) {