[staging-next 4/4] staging/easycap: use USB_SUBCLASS_AUDIOSTREAMING instead of 0x02

Dan Carpenter error27 at gmail.com
Mon Feb 21 13:57:31 UTC 2011


On Mon, Feb 21, 2011 at 01:23:28PM +0200, Tomas Winkler wrote:
>  	} else if ((USB_CLASS_AUDIO == bInterfaceClass) &&
> -		   (0x02 == bInterfaceSubClass)) {
> +		   (USB_SUBCLASS_AUDIOSTREAMING == bInterfaceSubClass)) {
>  		if (-1 == peasycap->audio_interface) {
>  			peasycap->audio_interface = bInterfaceNumber;
>  			JOM(4, "setting peasycap->audio_interface=%i\n",
> @@ -3654,7 +3655,8 @@ static int easycap_usb_probe(struct usb_interface *pusb_interface,
>  						break;
>  					}
>  					case USB_CLASS_AUDIO: {
> -						if (0x02 != bInterfaceSubClass)
> +						if (bInterfaceClass !=
> +						    USB_SUBCLASS_AUDIOSTREAMING)

Btw. I would have swapped the order on the first one as well.  This
whole driver is full of Yoda style if statements...

I reviewed all four patches.

Reviewed-by: Dan Carpenter <error27 at gmail.com>

regards,
dan carpenter



More information about the devel mailing list