From patchwork Sat Jun 1 09:12:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2647421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 2AB79DFE76 for ; Sat, 1 Jun 2013 09:35:26 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uihtk-0006Zd-DY; Sat, 01 Jun 2013 09:14:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UihsF-0003V0-6r; Sat, 01 Jun 2013 09:13:19 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UihsC-0003RY-8F for linux-arm-kernel@lists.infradead.org; Sat, 01 Jun 2013 09:13:17 +0000 Received: from wuerfel.localnet (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0LfYxF-1U2R8s0oKP-00p3kR; Sat, 01 Jun 2013 11:12:27 +0200 From: Arnd Bergmann To: Brian Norris Subject: [PATCH v2] iwlegacy: il_pm_ops is only provided for PM_SLEEP Date: Sat, 01 Jun 2013 11:12:32 +0200 Message-ID: <23624869.gZVMHbzzA4@wuerfel> User-Agent: KMail/4.10.2 (Linux/3.10.0-rc3-next-20130527+; KDE/4.10.3; x86_64; ; ) In-Reply-To: References: <1370038972-2318779-1-git-send-email-arnd@arndb.de> <1370038972-2318779-12-git-send-email-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V02:K0:T2u3dMvo4m8YzAA0ipW9yRFLnRchWlh0GLD/bIYwzDH fOCvp2YL5L5+Vk9/e7FbxWnlOVN+7OlME9SdKBtYBeLjMj9b+l 5JE1hnSQ0M94yxjlHaZ+uoVf/lncggnY8qM01gsyOhjXRZ5boj 7Gkhq0LdaZoYmUQ8SOaq6HBEpjtcF+wxiQwLHKhI7xkvEMtz3V KHMwLhiags6D0p80W1bK+T7jNc8PfDNyH35nw7f67TVCt0ojWy N4ILge/nRTzBXIjtTIdSn8aJBNM+EkpR/EgSTY9zK23KQMFXXe mVDvKSFPiLRkYDjXsnrNcD1ze+5nUBLE7HFybAoQAkCU+PQFwr AEUYGTRxYDau45ZR6sCg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130601_051316_536300_9927E54D X-CRM114-Status: UNSURE ( 6.81 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.9 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Johannes Berg , linux-kernel@vger.kernel.org, "John W. Linville" , Borislav Petkov , patches@lists.linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This makes sure the conditionals for the declaration match the definition, so we provide the alternative #else #define IL_LEGACY_PM_OPS NULL #endif in the correct cases. As suggested by Borislav Petkov, this removes the comments for the #else and #endif lines. drivers/built-in.o:(.data+0x57974): undefined reference to `il_pm_ops' Cc: Johannes Berg Cc: John W. Linville Cc: Borislav Petkov Signed-off-by: Arnd Bergmann --- v2: Fixed the obvious bug pointed out by Brian Norris, and actually build-tested the new version. diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index f8246f2..f043092 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h @@ -1832,16 +1832,16 @@ u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval); __le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon, u32 beacon_interval); -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP extern const struct dev_pm_ops il_pm_ops; #define IL_LEGACY_PM_OPS (&il_pm_ops) -#else /* !CONFIG_PM */ +#else #define IL_LEGACY_PM_OPS NULL -#endif /* !CONFIG_PM */ +#endif /***************************************************** * Error Handling Debugging