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: NChris Rorvick <chris@rorvick.com> Reviewed-by: NStefan Hajnoczi <stefanha@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Showing
想要评论请 注册 或 登录