aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/maestro3.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/maestro3.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/maestro3.c')
-rw-r--r--sound/pci/maestro3.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 9387533f70dc..c76ac1411210 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2586,8 +2586,9 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
2586 else { 2586 else {
2587 quirk = snd_pci_quirk_lookup(pci, m3_amp_quirk_list); 2587 quirk = snd_pci_quirk_lookup(pci, m3_amp_quirk_list);
2588 if (quirk) { 2588 if (quirk) {
2589 snd_printdd(KERN_INFO "maestro3: set amp-gpio " 2589 snd_printdd(KERN_INFO
2590 "for '%s'\n", quirk->name); 2590 "maestro3: set amp-gpio for '%s'\n",
2591 snd_pci_quirk_name(quirk));
2591 chip->amp_gpio = quirk->value; 2592 chip->amp_gpio = quirk->value;
2592 } else if (chip->allegro_flag) 2593 } else if (chip->allegro_flag)
2593 chip->amp_gpio = GPO_EXT_AMP_ALLEGRO; 2594 chip->amp_gpio = GPO_EXT_AMP_ALLEGRO;
@@ -2597,8 +2598,9 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
2597 2598
2598 quirk = snd_pci_quirk_lookup(pci, m3_irda_quirk_list); 2599 quirk = snd_pci_quirk_lookup(pci, m3_irda_quirk_list);
2599 if (quirk) { 2600 if (quirk) {
2600 snd_printdd(KERN_INFO "maestro3: enabled irda workaround " 2601 snd_printdd(KERN_INFO
2601 "for '%s'\n", quirk->name); 2602 "maestro3: enabled irda workaround for '%s'\n",
2603 snd_pci_quirk_name(quirk));
2602 chip->irda_workaround = 1; 2604 chip->irda_workaround = 1;
2603 } 2605 }
2604 quirk = snd_pci_quirk_lookup(pci, m3_hv_quirk_list); 2606 quirk = snd_pci_quirk_lookup(pci, m3_hv_quirk_list);