Skip to contentSkip to conversation

ALSA: hda - remove check on CONFIG_SND_HDA_I915 in azx_probe_continue()

PATCH In review [email protected] 2 participants 2 messages Apr 30, 2015 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda - remove check on CONFIG_SND_HDA_I915 in azx_probe_continue()

From: Mengdong Lin <[email protected]>

This is to avoid a build warning that label 'i915_power_fail' is defined but not used.

There are already fake hda_i915 functions when CONFIG_SND_HDA_I915 is not defined, and error message for missing CONFIG_SND_HDA_I915 for the HD-A controller or codec that depends on i915 power well.

sound/pci/hda/hda_intel.c +0 -3
index 5aa5cfa..87df90d 100644
@@ -1907,8 +1907,6 @@ static int azx_probe_continue(struct azx *chip)
 		if (pci->device != 0x0f04 && pci->device != 0x2284)
 			hda->need_i915_power = 1;
 
-
-#ifdef CONFIG_SND_HDA_I915
 		err = hda_i915_init(hda);
 		if (err < 0)
 			goto i915_power_fail;
@@ -1919,7 +1917,6 @@ static int azx_probe_continue(struct azx *chip)
 				"Cannot turn on display power on i915\n");
 			goto i915_power_fail;
 		}
-#endif
 	}
 
 	err = azx_first_init(chip);
Signature · 1 line
1.9.1
#1 lore raw

At Thu, 30 Apr 2015 15:10:18 +0800,

Quoted 11 lines · [email protected] wrote:

From: Mengdong Lin <[email protected]>

This is to avoid a build warning that label 'i915_power_fail' is defined but not used.

There are already fake hda_i915 functions when CONFIG_SND_HDA_I915 is not defined, and error message for missing CONFIG_SND_HDA_I915 for the HD-A controller or codec that depends on i915 power well.

It's not enough since hda_i915_init() returns an error for CONFIG_SND_HDA_I915=n. But I already fixed it, so don't worry about this.

Takashi

Quoted 25 lines
sound/pci/hda/hda_intel.c +0 -3
index 5aa5cfa..87df90d 100644
@@ -1907,8 +1907,6 @@ static int azx_probe_continue(struct azx *chip)
 		if (pci->device != 0x0f04 && pci->device != 0x2284)
 			hda->need_i915_power = 1;
 
-
-#ifdef CONFIG_SND_HDA_I915
 		err = hda_i915_init(hda);
 		if (err < 0)
 			goto i915_power_fail;
@@ -1919,7 +1917,6 @@ static int azx_probe_continue(struct azx *chip)
 				"Cannot turn on display power on i915\n");
 			goto i915_power_fail;
 		}
-#endif
 	}
 
 	err = azx_first_init(chip);
Signature · 1 line
1.9.1