iio: hid-sensor-hub: Remove hard coded indexes
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Fri, 24 Jan 2014 02:50:22 +0000 (18:50 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 17 Feb 2014 14:09:47 +0000 (15:09 +0100)
commit1a214ae5d1a66ead18c5e8c3a8d03b969b0ee647
tree7839c6acba3c7f1e2f86c2a88e2d167f1d234c56
parente02cee4819ae51f26333471c8eed50678b08572a
iio: hid-sensor-hub: Remove hard coded indexes

Remove the hard coded indexes, instead search for usage id and
use the index to set the power and report state.
This will fix issue, where the report descriptor doesn't contain
the full list of possible selector for power and report state.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
include/linux/hid-sensor-ids.h