aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/intel8x0.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-25 04:54:07 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-25 12:32:14 -0500
commit86b2723725a2e186f5699d97cb20014fa893931f (patch)
tree844f9f196c14bf3f361e85ec28b5ad60e334dcc0 /sound/pci/intel8x0.c
parentf4f678d22219f5821f46bb78eb4da7f76f1899bc (diff)
ALSA: Make snd_printd() and snd_printdd() inline
Because currently snd_printd() and snd_printdd() macros are expanded to empty when CONFIG_SND_DEBUG=n, a compile warning like below appears sometimes, and we had to covert it by ugly ifdefs: sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’: sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable] For "fixing" these issues better, this patch replaces snd_printd() and snd_printdd() definitions with empty inline functions instead of macros. This should have the same effect but shut up warnings like above. But since we had already put ifdefs, changing to inline functions would trigger compile errors. So, such ifdefs is removed in this patch. In addition, snd_pci_quirk name field is defined only when CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in snd_printdd() argument triggers the build errors, too. For avoiding these errors, introduce a new macro snd_pci_quirk_name() that is defined no matter how the debug option is set. Reported-by: Stratos Karafotis <stratosk@semaphore.gr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/intel8x0.c')
-rw-r--r--sound/pci/intel8x0.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 3b9be752f3e2..b8fe40531b9c 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -3266,11 +3266,13 @@ static int check_default_spdif_aclink(struct pci_dev *pci)
3266 w = snd_pci_quirk_lookup(pci, spdif_aclink_defaults); 3266 w = snd_pci_quirk_lookup(pci, spdif_aclink_defaults);
3267 if (w) { 3267 if (w) {
3268 if (w->value) 3268 if (w->value)
3269 snd_printdd(KERN_INFO "intel8x0: Using SPDIF over " 3269 snd_printdd(KERN_INFO
3270 "AC-Link for %s\n", w->name); 3270 "intel8x0: Using SPDIF over AC-Link for %s\n",
3271 snd_pci_quirk_name(w));
3271 else 3272 else
3272 snd_printdd(KERN_INFO "intel8x0: Using integrated " 3273 snd_printdd(KERN_INFO
3273 "SPDIF DMA for %s\n", w->name); 3274 "intel8x0: Using integrated SPDIF DMA for %s\n",
3275 snd_pci_quirk_name(w));
3274 return w->value; 3276 return w->value;
3275 } 3277 }
3276 return 0; 3278 return 0;