]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf46f4470a53b53941c6284d6bd9b10bc0578deb5
tree64b379b32a3b0f33fca21b8ec1296d6a9873f2ae
parente78ff5d4c3f6d6dd1d3c54444fc95dc1f0641ecd
staging: line6: Key off of device type

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