ALSA: usb: Fix fill_max flag set
authorTakashi Iwai <tiwai@suse.de>
Fri, 13 Apr 2012 10:41:54 +0000 (12:41 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 13 Apr 2012 10:41:54 +0000 (12:41 +0200)
ep->fill_max is a 1 bit flag, thus it has to be boolean.
  sound/usb/endpoint.c: In function 'snd_usb_endpoint_set_params':
  sound/usb/endpoint.c:785: warning: overflow in implicit constant conversion

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

index 8b695d5562e6e45ffaf62ecbc189c7614d358801..12e5a951a143fa9ee091ac98c4989470ea468ccb 100644 (file)
@@ -771,7 +771,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
 
        ep->datainterval = fmt->datainterval;
        ep->maxpacksize = fmt->maxpacksize;
-       ep->fill_max = fmt->attributes & UAC_EP_CS_ATTR_FILL_MAX;
+       ep->fill_max = !!(fmt->attributes & UAC_EP_CS_ATTR_FILL_MAX);
 
        if (snd_usb_get_speed(ep->chip->dev) == USB_SPEED_FULL)
                ep->freqn = get_usb_full_speed_rate(params_rate(hw_params));