Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2440641imm; Sat, 29 Sep 2018 19:47:09 -0700 (PDT) X-Google-Smtp-Source: ACcGV61keE+9tkVxoVbUjtcFYwjI1MORCCDI5+us72AMzr57usCSmd14VHA091YAupv8sUxDl4d2 X-Received: by 2002:a63:1624:: with SMTP id w36-v6mr4877888pgl.409.1538275629409; Sat, 29 Sep 2018 19:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538275629; cv=none; d=google.com; s=arc-20160816; b=LcoHKx5Q/3Jq28POm3US0+fnKqc5RY399o3+3stucOnEkrUJrmRT4qA4I7B7te+mZR S/sZM5NEBk/rJQR2rFXIFle15C/OyRZt8cw6TzpG1OAhgJxqEKqJTEYNNoh0K0sDK2fh 2dl7ejW7nrU5XqdwlGRtB+CokRUyIxYOj9oe3Wb/FISXDGvofRgKOsRvWUqlQy5MtznF mRKCtCwiShrB2HBXOmv/oI3SwTbVsaLVsBpTVuyu6kkZLjXE7Fn7K5ANqxuPrQtOJt2v PFt26qgoLmOB8QNer407xvpfxYbe4oQww/0/0Sh5QIyW3ZkeRRJqgxZeZXQ3ZGgHl/4a qHrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=kHwwVArwzXPrXY5mxz+LmJP3v0tpb5g+PFqQZTgaecg=; b=gWVtGn1m0ymrS0O2x5EKm4r2zLfvOYFlm2P29HCj/9f1wqQPQQukKzs+tN03jV5JFQ 1zrbN7/W3T8PBxBA6zipxZN6Y+wOuWQwT270TX6q1f4DlTrJOoUpD7uWWeIttfLtPtLU vj0BY6bwLzbW0TFAPMviOJv+EEQ+S7Xb5venF7VVQ3Agsyt8DMWL9N+MSrhZIAkotlmE hhvhpzpZZaD2mtR6oR52uzvTwdAVqADC+rVCOMTmOfLinTt9l9QRbuShftbaJ3gK+19j UOG8Xv9mjdZsDE8Njlhq0pGEN9qAf315/piLgbHYEDuyhf4gMLBdeakHcHrr75uWEQJL 05yQ== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i90-v6si8747395pli.274.2018.09.29.19.46.54; Sat, 29 Sep 2018 19:47:09 -0700 (PDT) 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 S1727625AbeI3JRi (ORCPT + 99 others); Sun, 30 Sep 2018 05:17:38 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:34066 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727153AbeI3JRh (ORCPT ); Sun, 30 Sep 2018 05:17:37 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 456FFFA953BD; Sun, 30 Sep 2018 10:46:32 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.399.0; Sun, 30 Sep 2018 10:46:28 +0800 From: zhong jiang To: CC: , , , , Subject: [PATCH v2] ASoC: wm8731: Fix a unused function gcc warning Date: Sun, 30 Sep 2018 10:33:56 +0800 Message-ID: <1538274836-26057-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following compile warning: sound/soc/codecs/wm8731.c:575:12: warning: 'wm8731_request_supplies' defined but not used [-Wunused-function] sound/soc/codecs/wm8731.c:600:12: warning: 'wm8731_hw_init' defined but not used [-Wunused-function] Signed-off-by: zhong jiang --- v1->v2: - Move the declaration of wm8731_supply_names into the #if block unused function has been wrapped to decrease the #if block definition. sound/soc/codecs/wm8731.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 7c8fad8..9399103 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -36,12 +36,6 @@ #include "wm8731.h" #define WM8731_NUM_SUPPLIES 4 -static const char *wm8731_supply_names[WM8731_NUM_SUPPLIES] = { - "AVDD", - "HPVDD", - "DCVDD", - "DBVDD", -}; /* codec private data */ struct wm8731_priv { @@ -572,6 +566,14 @@ static int wm8731_startup(struct snd_pcm_substream *substream, .symmetric_rates = 1, }; +#if defined(CONFIG_I2C) || defined(CONFIG_SPI_MASTER) +static const char *wm8731_supply_names[WM8731_NUM_SUPPLIES] = { + "AVDD", + "HPVDD", + "DCVDD", + "DBVDD", +}; + static int wm8731_request_supplies(struct device *dev, struct wm8731_priv *wm8731) { @@ -627,6 +629,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731) return ret; } +#endif static const struct snd_soc_component_driver soc_component_dev_wm8731 = { .set_bias_level = wm8731_set_bias_level, -- 1.7.12.4