summaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-25 17:19:36 -0400
committerTakashi Iwai <tiwai@suse.de>2018-07-27 03:05:24 -0400
commita6ea5fe95ab4a1a7af6d57429fe3ecde9acf5b5a (patch)
treec48bd1821ebfadb97b3d4427223e26366132434a /sound/hda
parentd6b340d7cb33c816ef4abe8143764ec5ab14a5cc (diff)
ALSA: hda: Fix implicit PCM format type conversion
The PCM format type is defined with __bitwise, hence it can't be passed as integer but needs an explicit cast. In this patch, instead of the messy cast flood, define the format argument of snd_hdac_calc_stream_format() to be the proper snd_pcm_format_t type. This fixes sparse warnings like: sound/hda/hdac_device.c:760:38: warning: incorrect type in argument 1 (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/hdac_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 7ba100bb1c3f..dbf02a3a8d2f 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -738,7 +738,7 @@ static struct hda_rate_tbl rate_bits[] = {
738 */ 738 */
739unsigned int snd_hdac_calc_stream_format(unsigned int rate, 739unsigned int snd_hdac_calc_stream_format(unsigned int rate,
740 unsigned int channels, 740 unsigned int channels,
741 unsigned int format, 741 snd_pcm_format_t format,
742 unsigned int maxbps, 742 unsigned int maxbps,
743 unsigned short spdif_ctls) 743 unsigned short spdif_ctls)
744{ 744{