Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10607821pxu; Wed, 30 Dec 2020 07:00:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR3oHoAMWfzY8tFCnn2NUyj9y5/ZjELAjg1bZ74VhDupQZ17H320WEVm9kVg1oGZrz/mdM X-Received: by 2002:a05:6000:90:: with SMTP id m16mr61130658wrx.165.1609340449596; Wed, 30 Dec 2020 07:00:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609340449; cv=none; d=google.com; s=arc-20160816; b=Xytlv+mf10ymNTrUknFxiLgUGnQp/jNvtqwnJ2OQhRiKKAnw211qgdYt3I54wj0ReC cnEVhQnBJVPQk946atS+M+reUpeERTXXTeUHORX7iXn3Ga94jITjqLT5CDwXGgxeurTf dzU1qMRnnqyiqLypKXD7NesUls9OoifVTGItDxI5IribCqlJLd4ML3E8lmICbGK2J92U NuVf+LUN6aUIXOCTT/PBeH9ZSAdt3M6dbsrdP9ytFCE7T3I2Y6aR/L+d6sQG319Jyp8T q2dD23uqfDoNyL+DQq7P8rcC+Nk+dQbn2BUwMTlQQWkMAZMdX3uOX7Y57gH0VtZvGR/q u+OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=431X09Gi0r8xHkuZ6lzmgNQYUvvK1zxeollYXZsnSHA=; b=Rm8kKF5Z8NaYM08OS3J1n95+P/WbkY0vaxb0QkKvHtUcATZADCAt38CFcAC3pk3QsC Z8hx5ZBqMC3C2KZx67HVaE+s848SYf09Uwn1IELTcGpxdYuN04Su/BeYjGb1il9a+6Yx uy6GkZppWZj5LYTQj7GMyiEV8jY3PX0piI7LaLLVhjs3QPaAwFGIrbKCH4zpQrXjxkjn 1W287JIr4RqJbAjkcXxp+t/Ft/8YgsN3YOWu98i5skKgnoIvfqdPVNqKL9JyPTBZhqys VL5fbUb2fo/3jyEmaB0jKHV7q5Qkc5FX8AH8OpLWx0KCrV+MXA90bgFC8gE0hXeecEP0 l5Mg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si23943271edv.542.2020.12.30.07.00.27; Wed, 30 Dec 2020 07:00:49 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726602AbgL3O6v (ORCPT + 99 others); Wed, 30 Dec 2020 09:58:51 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:57220 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726161AbgL3O6v (ORCPT ); Wed, 30 Dec 2020 09:58:51 -0500 X-IronPort-AV: E=Sophos;i="5.78,461,1599490800"; d="scan'208";a="67489849" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 30 Dec 2020 23:57:59 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 627C4400CA1D; Wed, 30 Dec 2020 23:57:57 +0900 (JST) From: Lad Prabhakar To: Mark Brown , Jiri Kosina , Sergei Shtylyov , Pavel Machek Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Lad Prabhakar Subject: [PATCH 2/2] spi: rpc-if: Remove CONFIG_PM_SLEEP ifdefery Date: Wed, 30 Dec 2020 14:57:08 +0000 Message-Id: <20201230145708.28544-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201230145708.28544-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20201230145708.28544-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use __maybe_unused for the suspend()/resume() hooks and get rid of the CONFIG_PM_SLEEP ifdefery to improve the code. Suggested-by: Pavel Machek Signed-off-by: Lad Prabhakar --- drivers/spi/spi-rpc-if.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c index bf64da322e67..b600becd4691 100644 --- a/drivers/spi/spi-rpc-if.c +++ b/drivers/spi/spi-rpc-if.c @@ -176,15 +176,14 @@ static int rpcif_spi_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int rpcif_spi_suspend(struct device *dev) +static int __maybe_unused rpcif_spi_suspend(struct device *dev) { struct spi_controller *ctlr = dev_get_drvdata(dev); return spi_controller_suspend(ctlr); } -static int rpcif_spi_resume(struct device *dev) +static int __maybe_unused rpcif_spi_resume(struct device *dev) { struct spi_controller *ctlr = dev_get_drvdata(dev); @@ -192,17 +191,13 @@ static int rpcif_spi_resume(struct device *dev) } static SIMPLE_DEV_PM_OPS(rpcif_spi_pm_ops, rpcif_spi_suspend, rpcif_spi_resume); -#define DEV_PM_OPS (&rpcif_spi_pm_ops) -#else -#define DEV_PM_OPS NULL -#endif static struct platform_driver rpcif_spi_driver = { .probe = rpcif_spi_probe, .remove = rpcif_spi_remove, .driver = { .name = "rpc-if-spi", - .pm = DEV_PM_OPS, + .pm = &rpcif_spi_pm_ops, }, }; module_platform_driver(rpcif_spi_driver); -- 2.17.1