diff options
author | Eldad Zack <eldad@fogrefinery.com> | 2013-04-23 01:00:41 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-04-29 13:36:15 +0200 |
commit | 74c34ca1cc12884703c70d34ed333517d978c2e7 (patch) | |
tree | 6d06b76a9fbe829f2427899aa708d682167420c0 /sound/usb/pcm.c | |
parent | 754813473c1a8b7711802313125f0fafc60141f8 (diff) |
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/usb/pcm.c')
-rw-r--r-- | sound/usb/pcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 9723f3ceb155..93b6e32cfead 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -100,7 +100,7 @@ static struct audioformat *find_format(struct snd_usb_substream *subs) int cur_attr = 0, attr; list_for_each_entry(fp, &subs->fmt_list, list) { - if (!(fp->formats & (1uLL << subs->pcm_format))) + if (!(fp->formats & pcm_format_to_bits(subs->pcm_format))) continue; if (fp->channels != subs->channels) continue; @@ -478,7 +478,7 @@ static int match_endpoint_audioformats(struct audioformat *fp, return 0; } - if (!(fp->formats & (1ULL << pcm_format))) { + if (!(fp->formats & pcm_format_to_bits(pcm_format))) { snd_printdd("%s: (fmt @%p) no match for format %d\n", __func__, fp, pcm_format); return 0; |