From patchwork Fri Jan 24 08:39:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 23662 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 658EC20307 for ; Fri, 24 Jan 2014 08:44:06 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id c14sf5364304vea.11 for ; Fri, 24 Jan 2014 00:44:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe:content-type:content-transfer-encoding; bh=Gzv/onmeQPso3oChR2gSdI+JDQmH7g5erGcSvn0NWs0=; b=mDX2HWnJYUBfZwhOrJ/ZIzCwctlZpy9M3QbplXDa2D3GF7QeK5pAPzVaevR9DxVFxc reEEfkKR+J2SCloTgMoj5lO8R+1c2tuDbxWTIT3q6sg/JrBF+L27GiIpnCwEHHMjjqud 00yYsid5ZmSRxzRg5MTpxydfq1QJZJRnZGWkz1KVKU9NfA3Oc0t8WtNzknvSkXonj4Il 7amM3cmCxX7aMOvA+4qqnp6v7zT/z773FEtBRo9IPCDMPaiUICTcKI4FvwTTFrQeldDo hlxLRadG/JUpvzeXZ3IUtzCMouZPogx8OYUCXP2yNqYBuHMowJX6e5SrWB2SfnenMBwE Yalg== X-Gm-Message-State: ALoCoQmtXZWhHHr/BPG3fkQ+G77qI4yAqpgR3BsTdYLESwIXtoSHZKVnPZcpNAemIXgUipCex0lE X-Received: by 10.236.89.15 with SMTP id b15mr4341711yhf.13.1390553045547; Fri, 24 Jan 2014 00:44:05 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.113 with SMTP id p104ls243252qga.41.gmail; Fri, 24 Jan 2014 00:44:05 -0800 (PST) X-Received: by 10.58.181.230 with SMTP id dz6mr3959003vec.35.1390553045383; Fri, 24 Jan 2014 00:44:05 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id w5si105069vcl.141.2014.01.24.00.44.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Jan 2014 00:44:05 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oz11so1764549veb.4 for ; Fri, 24 Jan 2014 00:44:05 -0800 (PST) X-Received: by 10.58.90.202 with SMTP id by10mr6807682veb.6.1390553045316; Fri, 24 Jan 2014 00:44:05 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp86198vcz; Fri, 24 Jan 2014 00:44:04 -0800 (PST) X-Received: by 10.68.98.3 with SMTP id ee3mr13216426pbb.31.1390553044229; Fri, 24 Jan 2014 00:44:04 -0800 (PST) Received: from mail-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48]) by mx.google.com with ESMTPS id sj5si293274pab.110.2014.01.24.00.44.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Jan 2014 00:44:04 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.48 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.48; Received: by mail-pb0-f48.google.com with SMTP id rr13so2964982pbb.21 for ; Fri, 24 Jan 2014 00:44:03 -0800 (PST) X-Received: by 10.68.92.98 with SMTP id cl2mr13077544pbb.81.1390553043771; Fri, 24 Jan 2014 00:44:03 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id gn5sm793702pbc.29.2014.01.24.00.44.00 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Jan 2014 00:44:03 -0800 (PST) From: Sachin Kamat To: alsa-devel@alsa-project.org Cc: patches@opensource.wolfsonmicro.com, broonie@kernel.org, lgirdwood@gmail.com, sbkim73@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/2] ASoC: wm8580: Fix build error Date: Fri, 24 Jan 2014 14:09:24 +0530 Message-Id: <1390552765-32210-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Re-organize the code a bit to fix the following build errors and warnings: sound/soc/codecs/wm8580.c:932:21: error: variable ‘wm8580_regmap’ has initializer but incomplete type static const struct regmap_config wm8580_regmap = { sound/soc/codecs/wm8580.c:233:20: warning: ‘wm8580_supply_names’ defined but not used [-Wunused-variable] sound/soc/codecs/wm8580.c:840:34: warning: ‘wm8580_dai’ defined but not used [-Wunused-variable] sound/soc/codecs/wm8580.c:914:36: warning: ‘soc_codec_dev_wm8580’ defined but not used [-Wunused-variable] Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm8580.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 318989acbbe5..7a9d6fa9f3b3 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -214,28 +214,12 @@ static const struct reg_default wm8580_reg_defaults[] = { { 52, 0x0000 }, }; -static bool wm8580_volatile(struct device *dev, unsigned int reg) -{ - switch (reg) { - case WM8580_RESET: - return true; - default: - return false; - } -} - struct pll_state { unsigned int in; unsigned int out; }; #define WM8580_NUM_SUPPLIES 3 -static const char *wm8580_supply_names[WM8580_NUM_SUPPLIES] = { - "AVDD", - "DVDD", - "PVDD", -}; - /* codec private data */ struct wm8580_priv { struct regmap *regmap; @@ -837,6 +821,7 @@ static const struct snd_soc_dai_ops wm8580_dai_ops_capture = { .set_pll = wm8580_set_dai_pll, }; +#if IS_ENABLED(CONFIG_I2C) static struct snd_soc_dai_driver wm8580_dai[] = { { .name = "wm8580-hifi-playback", @@ -863,6 +848,7 @@ static struct snd_soc_dai_driver wm8580_dai[] = { .ops = &wm8580_dai_ops_capture, }, }; +#endif static int wm8580_probe(struct snd_soc_codec *codec) { @@ -911,7 +897,7 @@ static int wm8580_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8580 = { +static struct snd_soc_codec_driver soc_codec_dev_wm8580 __maybe_unused = { .probe = wm8580_probe, .remove = wm8580_remove, .set_bias_level = wm8580_set_bias_level, @@ -929,6 +915,23 @@ static const struct of_device_id wm8580_of_match[] = { { }, }; +#if IS_ENABLED(CONFIG_I2C) +static const char *wm8580_supply_names[WM8580_NUM_SUPPLIES] = { + "AVDD", + "DVDD", + "PVDD", +}; + +static bool wm8580_volatile(struct device *dev, unsigned int reg) +{ + switch (reg) { + case WM8580_RESET: + return true; + default: + return false; + } +} + static const struct regmap_config wm8580_regmap = { .reg_bits = 7, .val_bits = 9, @@ -941,7 +944,6 @@ static const struct regmap_config wm8580_regmap = { .volatile_reg = wm8580_volatile, }; -#if IS_ENABLED(CONFIG_I2C) static int wm8580_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) {