ALSA: au88x0: Fix sparse warning wrt PCM format type
authorTakashi Iwai <tiwai@suse.de>
Wed, 25 Jul 2018 21:19:40 +0000 (23:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 27 Jul 2018 07:05:28 +0000 (09:05 +0200)
The PCM format type is with __bitwise, and it can't be converted from
integer implicitly.  Instead of an ugly cast, declare the function
argument of vortex_alsafmt_aspfmt() with the proper snd_pcm_format_t
type.

This fixes the sparse warning like:
  sound/pci/au88x0/au88x0_core.c:2778:14: warning: restricted snd_pcm_format_t degrades to integer

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/au88x0/au88x0.h
sound/pci/au88x0/au88x0_core.c

index bcc648bf647802fc747b0dfed82ff0dd4742a239..e3e31f07d766196e54cae7854635ee538a2b2016 100644 (file)
@@ -241,7 +241,7 @@ static int vortex_core_init(vortex_t * card);
 static int vortex_core_shutdown(vortex_t * card);
 static void vortex_enable_int(vortex_t * card);
 static irqreturn_t vortex_interrupt(int irq, void *dev_id);
-static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v);
+static int vortex_alsafmt_aspfmt(snd_pcm_format_t alsafmt, vortex_t *v);
 
 /* Connection  stuff. */
 static void vortex_connect_default(vortex_t * vortex, int en);
index 4083c8b01619fb191a7232f574785b2a971f5127..2e5b460a847c678c7af2b2945e34be906e91299d 100644 (file)
@@ -2770,7 +2770,7 @@ static int vortex_core_shutdown(vortex_t * vortex)
 
 /* Alsa support. */
 
-static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v)
+static int vortex_alsafmt_aspfmt(snd_pcm_format_t alsafmt, vortex_t *v)
 {
        int fmt;