ALSA: usb-audio - Fix types taken in min()
authorTakashi Iwai <tiwai@suse.de>
Tue, 11 Aug 2009 06:15:04 +0000 (08:15 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 11 Aug 2009 06:16:15 +0000 (08:16 +0200)
Fix the compile warning due to different integer types used in min():
  sound/usb/usbaudio.c: In function 'init_substream_urbs':
  sound/usb/usbaudio.c:1087: warning: comparison of distinct pointer types lacks a cast

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

index fa3f7a1dc5e1669baeca955d64bb0019f23c8920..5149c5893eaae66739577a9f0be7ad69b8f376d9 100644 (file)
@@ -1084,7 +1084,7 @@ static int init_substream_urbs(struct snd_usb_substream *subs, unsigned int peri
                urb_packs = 1;
        urb_packs *= packs_per_ms;
        if (subs->syncpipe)
-               urb_packs = min(urb_packs, 1 << subs->syncinterval);
+               urb_packs = min(urb_packs, 1U << subs->syncinterval);
 
        /* decide how many packets to be used */
        if (is_playback) {