Re: [PATCH] usb: class: Use USB_CLASS_PRINTER instead of number 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 19 Jun 2015 11:37:08 +0200
Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx> wrote:

> Kernel provides very nice defines for USB device class
> so it's a good idea to use them in suitable places.
> It is much easier to grep for such define instead of 7.

>  static const struct usb_device_id usblp_ids[] = {
> -	{ USB_INTERFACE_INFO(7, 1, 3) },
> +	{ USB_INTERFACE_INFO(USB_CLASS_PRINTER, 1, 3) },
>  	{ USB_DEVICE(0x04b8, 0x0202) },	/* Seiko Epson Receipt Printer M129C */

If you're concerned about grepping, then fix all other places like
usblp_select_alts(), too.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux