From patchwork Fri Feb 5 15:21:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8235801 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7B270BEEE5 for ; Fri, 5 Feb 2016 15:23:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9429B20357 for ; Fri, 5 Feb 2016 15:23:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4C19202F2 for ; Fri, 5 Feb 2016 15:23:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488AbcBEPWv (ORCPT ); Fri, 5 Feb 2016 10:22:51 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:65255 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbcBEPWu (ORCPT ); Fri, 5 Feb 2016 10:22:50 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0Lzadu-1ZxLHn1MAs-014opn; Fri, 05 Feb 2016 16:22:17 +0100 From: Arnd Bergmann To: Glen Lee , Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Johnny Kim , Austin Shin , Chris Park , Tony Cho , Leo Kim , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: wilc1000: fix compilation without CONFIG_PM Date: Fri, 5 Feb 2016 16:21:50 +0100 Message-Id: <1454685729-3663377-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:q0ujTxZAOHNO0IsuE6Sm2QRWjgxVdPoNSu5K5ZRmpuidcu8nJ3u r6d9ArReTHpJxHOWMWXgpOn5b9LC6CRGp7c83OeVgNtkxxJuPThPuOg5EwzUhP2EH9YpzQb yKt83zZ8YjMlfHqwopPZ3U2hQ0BPRwwXv6ZEIPtxWN6vYJqOFkpPdqggsLVtFOCqXXZNIbJ uQevGoGhhoEr+UlaG3dCA== X-UI-Out-Filterresults: notjunk:1; V01:K0:gIBTKLBRj40=:WfIvo6btdb0sOOhsUSXJno k8C0HsIFaxS6w+3p3YUEgSnO9Z5FhZRl70LSUlsNlLNfsbvMgw+cS3w7fkHHhYzD31qGvuWcM YZ5hMP9AvSEbYk5yfbETgxMQSgWTTeQXZKRcJYDsw9j3bw518rnfdr+GXwnHidXIxI3aw35iu dEznWFrDu9oqKcMSGhbetCVGl0ozi7SZdbaRY5EMel1S4GObuXxEFGWk9d2swwCUumaTXwddh TcUynSloAiBzGNr56MGj9KA4drE0+4XH2KwMEo9eJVprx55qlUAVoup/FXNrdJRPUof3YSQOL 0zfhldf4Ss67LYIL+TUdUgzu1jaVvFYXxGLzN35tvkt+9UCzIflxhybnonsQsnyXa0D7Y63Dq HYuxJksBN1EUhYOsMw35o4uIB+bnFNaBhC61ZrtzS8o/nXlzl2+IGgWVxJX8tYm9GpmmyEbOc 2CGJJ4QXsdZwyc21r4liB1xDt9GS8vERrpHyoKsdW1GTrNoyhjlSkZ9AI2pI9P7YfTWkRwsBK SjpbeYc89+rPnH2Y6xgV85qspkcQIvOdahCY/kcNO3xMuFsP39icbhRZUa7vt7iuuYbjYcTEr Ykp5OAapDDz+mE7fyahjc4yJkqwz62pMup07QxaTbM2dy6yuL49hOf4tucNRnlcz8K8bBg4OB nv04PGbup4CwnspOB4rNlCig9UAsWZMv4jz052IzpJwBBA9Z1TWf6bMXDctgPenNoooI= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 After the addition of the wakeup code in wilc1000, it no longer builds when CONFIG_PM is disabled: drivers/staging/wilc1000/wilc_wfi_cfgoperations.c: In function 'wilc_create_wiphy': drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2632:13: error: 'struct wiphy' has no member named 'wowlan' wdev->wiphy->wowlan = &wowlan_support; This marks the wowlan_support variable as __maybe_unused and hides the reference when CONFIG_PM is disabled to avoid the build error. Signed-off-by: Arnd Bergmann Fixes: 73584a40d748 ("staging: wilc1000: add ops resuem/suspend/wakeup in cfg80211") --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 4eede2b4e661..7e6262026070 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -74,7 +74,7 @@ static const struct ieee80211_txrx_stypes } }; -static const struct wiphy_wowlan_support wowlan_support = { +static const struct wiphy_wowlan_support wowlan_support __maybe_unused = { .flags = WIPHY_WOWLAN_ANY }; @@ -2629,7 +2629,9 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *de sema_init(&(priv->SemHandleUpdateStats), 1); priv->wdev = wdev; wdev->wiphy->max_scan_ssids = MAX_NUM_PROBED_SSID; +#ifdef CONFIG_PM wdev->wiphy->wowlan = &wowlan_support; +#endif wdev->wiphy->max_num_pmkids = WILC_MAX_NUM_PMKIDS; PRINT_INFO(CFG80211_DBG, "Max number of PMKIDs = %d\n", wdev->wiphy->max_num_pmkids);