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: 102844 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp29077lbl; Fri, 5 Feb 2016 07:22:53 -0800 (PST) X-Received: by 10.66.164.196 with SMTP id ys4mr20445225pab.119.1454685773534; Fri, 05 Feb 2016 07:22:53 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s77si8028749pfs.76.2016.02.05.07.22.53; Fri, 05 Feb 2016 07:22:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752917AbcBEPWv (ORCPT + 30 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.0 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);