From: Frans Klaver <frans.klaver@xsens.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Frans Klaver <frans.klaver@xsens.com>,
Jaroslav Kysela <perex@perex.cz>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] sound: hda_intel: fix warning if SND_HDA_I915=n
Date: Wed, 17 Jun 2015 14:53:19 +0200 [thread overview]
Message-ID: <1434545599-17662-1-git-send-email-frans.klaver@xsens.com> (raw)
When building with CONFIG_SND_HDA_I915=n, I get the following warning:
sound/pci/hda/hda_intel.c: In function ‘azx_probe_continue’:
sound/pci/hda/hda_intel.c:1882:2: warning: label ‘skip_i915’ defined but not used [-Wunused-label]
skip_i915:
^
Fix this by using 'if (IS_ENABLED())' rather than #ifdef.
Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
---
sound/pci/hda/hda_intel.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a244ba706317..d85a53ceab6d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1856,8 +1856,8 @@ static int azx_probe_continue(struct azx *chip)
int err;
/* Request power well for Haswell HDA controller and codec */
- if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
-#ifdef CONFIG_SND_HDA_I915
+ if (IS_ENABLED(CONFIG_SND_HDA_I915) &&
+ chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
err = hda_i915_init(hda);
if (err < 0) {
/* if the controller is bound only with HDMI/DP
@@ -1876,7 +1876,6 @@ static int azx_probe_continue(struct azx *chip)
"Cannot turn on display power on i915\n");
goto out_free;
}
-#endif
}
skip_i915:
--
2.3.4
next reply other threads:[~2015-06-17 12:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 12:53 Frans Klaver [this message]
2015-06-17 13:13 ` Takashi Iwai
2015-06-17 13:17 ` Frans Klaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434545599-17662-1-git-send-email-frans.klaver@xsens.com \
--to=frans.klaver@xsens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®