From patchwork Thu Nov 19 14:16:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7657491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BA3B19F2EC for ; Thu, 19 Nov 2015 14:18:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EEBBF206A7 for ; Thu, 19 Nov 2015 14:18:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C71E20499 for ; Thu, 19 Nov 2015 14:18:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZzQ1I-0002Pb-53; Thu, 19 Nov 2015 14:17:04 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZzQ1C-0002Lr-Aa for linux-arm-kernel@lists.infradead.org; Thu, 19 Nov 2015 14:17:02 +0000 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0MAeNv-1a6JuU0xkR-00Bt25; Thu, 19 Nov 2015 15:16:33 +0100 From: Arnd Bergmann To: Tejun Heo Subject: [PATCH RESEND v2] sata/mvebu: use #ifdef around suspend/resume code Date: Thu, 19 Nov 2015 15:16:30 +0100 Message-ID: <8025767.rG7ykO9yUZ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:4u3RHLyi6rUOZzUnbFWl1JNQj0NOrE+ihson50YgZOIWTOmaHmT eRr2QRKM4FbZUar2AnFSTs+pxo5l8g3sZH3wodJ4vPmLdHzbzM+FjAf0Hn3sUUSMrBa95jo zoxqulf+vwaPivXlgCq0RbP3MfWikGpS5/FKjv+qdgOS8odqsylYXzQFjbtXfuaFasPFbYC I6FFDTIZ9v7zOajYLcEaQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:L72Qwq/EUhE=:3KBbpxYxdBcbzP7nnHDUn2 cQFPeGoxJU+iF0RVJzszMiYQs1sks2cAcOV9oPu4Q0mkH5AsfKEdvPzUlTsWQvegIUclf310s Z23rS/4qCKMor3rOcQP2SuCEkAxbeUOlAieli50nYJ5x6IRHg3yVTXkaqaM+sm4hllzBtzZEH CICGB92Gnrau3mwu5RWZxErd4eIN7gPW7EqcVn+C2+wlRLL3tGe12z3nf5lg+wjV14SYks0KI MH/Dy8mtsbaBe99phwquM9cM47sTlH4lwgKTfdEDr4sd4/QgRpGtINnKfitn+RZLJMADhxC1D 10OooSYy6UA+SknJfyOAaUQzz4apL8YQ8C/n5ILOBPuXCqSuY7JcsE1DzlRqLfcg6qTBqyij7 scV7+uX/VB9nXc+ADYP8rzy3BPcktwDEvpp3u6Jqlkf1rVvLXmvILzqCrVeUA9KbSF3/QD1nz 5C0qP/ydCNlHe3/0x13BukHSo0TLUaXThLd1CYLiFRAsWikbjHxgjOne8HYkXXWrkVzdTvlnk F+otasn9PJFsWvAtwWGSgyASreRb4TMdzGHZw6jgqivN6L3ZdeOuU7EPqFYsitnHbW3w1iZRH N/8qghlv7U7gVTqZeUT0n7UKLVNxjbQWwTt4JJKPzPQPM6HUV7G3I9inMT6WGMol6r8S3b6oF dxehL+TX1Ldb6NuGQX94umUuvDifWGwh4ZMDwQTfTeSFymvDZoI2mr9CDl8f35JkHsXNCLqV9 mKiijIYTjc8QDWMb X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151119_061658_733093_6B1AD975 X-CRM114-Status: GOOD ( 13.78 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The newly added suspend/resume implementation for ahci_mvebu causes a link error when CONFIG_PM_SLEEP is disabled: ERROR: "ahci_platform_suspend_host" [drivers/ata/ahci_mvebu.ko] undefined! ERROR: "ahci_platform_resume_host" [drivers/ata/ahci_mvebu.ko] undefined! This adds the same #ifdef here that exists in the ahci_platform driver which defines the above functions. Signed-off-by: Arnd Bergmann Fixes: d6ecf1581488 ("ata: ahci_mvebu: add suspend/resume support") Acked-by: Thomas Petazzoni --- The patch hasn't shown up in linux-next yet, but is still needed, resending. Also fixed a typo in description. diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c index 8490d37aee2a..f7a7fa81740e 100644 --- a/drivers/ata/ahci_mvebu.c +++ b/drivers/ata/ahci_mvebu.c @@ -62,6 +62,7 @@ static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv) writel(0x80, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_DATA); } +#ifdef CONFIG_PM_SLEEP static int ahci_mvebu_suspend(struct platform_device *pdev, pm_message_t state) { return ahci_platform_suspend_host(&pdev->dev); @@ -81,6 +82,10 @@ static int ahci_mvebu_resume(struct platform_device *pdev) return ahci_platform_resume_host(&pdev->dev); } +#else +#define ahci_mvebu_suspend NULL +#define ahci_mvebu_resume NULL +#endif static const struct ata_port_info ahci_mvebu_port_info = { .flags = AHCI_FLAG_COMMON,