Commit 31c648e0 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Reduce ifdef CONFIG_SND_HDA_I915

We're providing dummy functions for CONFIG_SND_HDA_i915=n, thus ifdef
can be reduced.  (But hda_i915_init() has to be fixed to return zero.)

This automatically fixes a compile warning:
  sound/pci/hda/hda_intel.c: In function 'azx_probe_continue':
  sound/pci/hda/hda_intel.c:1966:1: warning: label 'i915_power_fail' defined but not used [-Wunused-label]
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2bd1f73f
...@@ -1904,8 +1904,6 @@ static int azx_probe_continue(struct azx *chip) ...@@ -1904,8 +1904,6 @@ static int azx_probe_continue(struct azx *chip)
if (pci->device != 0x0f04 && pci->device != 0x2284) if (pci->device != 0x0f04 && pci->device != 0x2284)
hda->need_i915_power = 1; hda->need_i915_power = 1;
#ifdef CONFIG_SND_HDA_I915
err = hda_i915_init(hda); err = hda_i915_init(hda);
if (err < 0) if (err < 0)
goto i915_power_fail; goto i915_power_fail;
...@@ -1916,7 +1914,6 @@ static int azx_probe_continue(struct azx *chip) ...@@ -1916,7 +1914,6 @@ static int azx_probe_continue(struct azx *chip)
"Cannot turn on display power on i915\n"); "Cannot turn on display power on i915\n");
goto i915_power_fail; goto i915_power_fail;
} }
#endif
} }
err = azx_first_init(chip); err = azx_first_init(chip);
......
...@@ -63,7 +63,7 @@ static inline int hda_display_power(struct hda_intel *hda, bool enable) ...@@ -63,7 +63,7 @@ static inline int hda_display_power(struct hda_intel *hda, bool enable)
static inline void haswell_set_bclk(struct hda_intel *hda) { return; } static inline void haswell_set_bclk(struct hda_intel *hda) { return; }
static inline int hda_i915_init(struct hda_intel *hda) static inline int hda_i915_init(struct hda_intel *hda)
{ {
return -ENODEV; return 0;
} }
static inline int hda_i915_exit(struct hda_intel *hda) static inline int hda_i915_exit(struct hda_intel *hda)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment