staging: line6: Index properties array with device type
authorChris Rorvick <chris@rorvick.com>
Mon, 12 Jan 2015 20:42:41 +0000 (12:42 -0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 12 Jan 2015 21:24:00 +0000 (22:24 +0100)
commitc33a20b71daf7e7d0d5746200621867ae44d09e9
tree8fc6fed91b73f6bea32e9ff3964f74ea9d0ad3a5
parent410dca8d99ae508078c90414b19f1758c1b4d6fd
staging: line6: Index properties array with device type

The current logic uses the index of the matched entry from the device
table as an offset to the corresponding properties entry.  The values
of the new `line6_device_type' enum are ordered such that they can be
used as an index into either of these arrays.  Drop the device entry
lookup logic and use the device type (via the .driver_info member)
instead.

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