staging: line6: Key off of device type
authorChris Rorvick <chris@rorvick.com>
Mon, 12 Jan 2015 20:42:42 +0000 (12:42 -0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 12 Jan 2015 21:24:01 +0000 (22:24 +0100)
The driver currently uses the device's idProduct as input to several
switch statements.  In some cases this is not sufficiently granular and
the interface number must be taken into account.

Store the device type in `usb_line6' and key off of it instead.  New
types can then be added that map to specific interfaces on the device so
that this conditional logic can be flattened out.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/staging/line6/driver.c
drivers/staging/line6/driver.h
drivers/staging/line6/pcm.c
drivers/staging/line6/toneport.c

Simple merge
Simple merge
Simple merge
Simple merge