Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp493839ybk; Fri, 15 May 2020 06:11:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGmYWOk/88++EUI/kwlWB80isGp5KSjNtAaf1vR5/KKkX88Lwo8nM56EbSWpe8E6iQWonf X-Received: by 2002:a05:6402:68f:: with SMTP id f15mr2838869edy.89.1589548306181; Fri, 15 May 2020 06:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589548306; cv=none; d=google.com; s=arc-20160816; b=Q05gkVS0VsDs95jLmBwlHOqt+8+ea2KRARTAn8jpr81CdvnjTGY6u3cAEfsxzyLqWL cys4wZ17IdIMzjPuio6Z21+Oc95Z36rmY9MogRL6EwXCG2LsOPL6DgC2mgmupCkJoWk3 7//HbmZVx5ivdROeleb3sUvRwMQ2l7FSGNQjFs3lmzpwIIg3+irb1lVdSjSMhF3vXPnA sGuwxYCTTL7ZZ/iI89LDmmOoTjDGjccH3uM+Ffz3rE2zx3tEjA6Nk8JWTJlIpluTB6P/ m0IygkjCdCW5DTA2KvjPb8xc7Vk+kioAedu0kNAlpxPNXYI9U6z+ZkxxPFXcvS8MaJKX pUKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Zmma8uQ9hbrj0a+5P1D3WABpLUpXo4RZs3lWWhGvkGY=; b=F8GfZfBZJHJfLZpWx0zYTGKX53Nd6sCEz8CBs2eSrtMHy+x5uU7cYOKnlNqintNttE VWN1Mvb8VmThzZnjqXd9v/BrRm6OfC7locGCJuMacIXoS8ny52KKn76cEHIOHMtyTk/A 6LoAFzytkTg0B6rRtwpaUKZClsM7eZ/4oLWwQPIHRVJ+xUfVeLtDAEn8/IyJwmY9VJuu zB1y7oHqHurF/FFN+3qJH947OuMlIQRJ1HjaOaaE9fDlOtrBId+rs0EsHpdmqOjF1WHu HLLpTntIPGJR7lt7rQSbGfvNyAwn+E/aHOERaV/YFQ6nJLDQ6WNJkWfOP0GoE9urDi+1 C9vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e9si1247373edl.560.2020.05.15.06.11.18; Fri, 15 May 2020 06:11:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726174AbgEONHe (ORCPT + 99 others); Fri, 15 May 2020 09:07:34 -0400 Received: from inva020.nxp.com ([92.121.34.13]:45142 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbgEONHd (ORCPT ); Fri, 15 May 2020 09:07:33 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 25BC11A06F9; Fri, 15 May 2020 15:07:32 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BA7571A06CB; Fri, 15 May 2020 15:07:29 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 31B13402A6; Fri, 15 May 2020 21:07:26 +0800 (SGT) From: Anson Huang To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] tty: serial: fsl_lpuart: Use __maybe_unused instead of #if CONFIG_PM_SLEEP Date: Fri, 15 May 2020 20:58:01 +0800 Message-Id: <1589547481-25932-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP 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 functions to simplify the code. Signed-off-by: Anson Huang --- drivers/tty/serial/fsl_lpuart.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 6a9909e..cca485d 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -2662,8 +2662,7 @@ static int lpuart_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int lpuart_suspend(struct device *dev) +static int __maybe_unused lpuart_suspend(struct device *dev) { struct lpuart_port *sport = dev_get_drvdata(dev); unsigned long temp; @@ -2721,7 +2720,7 @@ static int lpuart_suspend(struct device *dev) return 0; } -static int lpuart_resume(struct device *dev) +static int __maybe_unused lpuart_resume(struct device *dev) { struct lpuart_port *sport = dev_get_drvdata(dev); bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)); @@ -2752,7 +2751,6 @@ static int lpuart_resume(struct device *dev) return 0; } -#endif static SIMPLE_DEV_PM_OPS(lpuart_pm_ops, lpuart_suspend, lpuart_resume); -- 2.7.4