]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3a4cf8090d0c7ffb5096223e3692ca8eaf48d6d2
tree8fc6fed91b73f6bea32e9ff3964f74ea9d0ad3a5
parente49863ae2b5e804579c8e3e20315cad4a829579f
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