ALSA: usb-audio: Declare the common variable in header file
authorTakashi Iwai <tiwai@suse.de>
Wed, 25 Jul 2018 21:00:53 +0000 (23:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 26 Jul 2018 06:32:00 +0000 (08:32 +0200)
Declare snd_usb_feature_unit_ctl properly in mixer.h.  Otherwise it's
error-prone.

This fixes the sparse warning:
  sound/usb/mixer.c:1464:25: warning: symbol 'snd_usb_feature_unit_ctl' was not declared. Should it be static?

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer.h
sound/usb/mixer_quirks.c

index e02653465e292d3b65db02b1032b006ff0b2f213..3d12af8bf1917bbffa6b02ad38ef0c920dc5d372 100644 (file)
@@ -109,4 +109,6 @@ int snd_usb_get_cur_mix_value(struct usb_mixer_elem_info *cval,
 
 extern void snd_usb_mixer_elem_free(struct snd_kcontrol *kctl);
 
+extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl;
+
 #endif /* __USBMIXER_H */
index e82a72fea9a1b088c184c1a901c99984dbafa00f..cbfb48bdea51d8b7dcd680f607f343f0e5535247 100644 (file)
@@ -47,8 +47,6 @@
 #include "mixer_us16x08.h"
 #include "helper.h"
 
-extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl;
-
 struct std_mono_table {
        unsigned int unitid, control, cmask;
        int val_type;