summaryrefslogtreecommitdiffstats
path: root/sound/atmel/ac97c.c
diff options
context:
space:
mode:
authorEldad Zack <eldad@fogrefinery.com>2013-04-23 01:00:41 +0200
committerTakashi Iwai <tiwai@suse.de>2013-04-29 13:36:15 +0200
commit74c34ca1cc12884703c70d34ed333517d978c2e7 (patch)
tree6d06b76a9fbe829f2427899aa708d682167420c0 /sound/atmel/ac97c.c
parent754813473c1a8b7711802313125f0fafc60141f8 (diff)
downloadlinux-74c34ca1cc12884703c70d34ed333517d978c2e7.tar.bz2
ALSA: pcm_format_to_bits strong-typed conversion
Add a function to handle conversion from snd_pcm_format_t to bitwise with proper typing. Change such conversions to use this function and silence sparse warnings. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/atmel/ac97c.c')
-rw-r--r--sound/atmel/ac97c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 79d6bda58753..6b7e2b5a72de 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -182,7 +182,7 @@ static int atmel_ac97c_playback_open(struct snd_pcm_substream *substream)
runtime->hw.rate_max = chip->cur_rate;
}
if (chip->cur_format)
- runtime->hw.formats = (1ULL << chip->cur_format);
+ runtime->hw.formats = pcm_format_to_bits(chip->cur_format);
mutex_unlock(&opened_mutex);
chip->playback_substream = substream;
return 0;
@@ -201,7 +201,7 @@ static int atmel_ac97c_capture_open(struct snd_pcm_substream *substream)
runtime->hw.rate_max = chip->cur_rate;
}
if (chip->cur_format)
- runtime->hw.formats = (1ULL << chip->cur_format);
+ runtime->hw.formats = pcm_format_to_bits(chip->cur_format);
mutex_unlock(&opened_mutex);
chip->capture_substream = substream;
return 0;