iio: hid_Sensors: fix crash during trigger unregister
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 30 Oct 2013 22:48:00 +0000 (22:48 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 2 Nov 2013 19:07:06 +0000 (19:07 +0000)
We can't store the trigger instance created by iio_trigger_alloc, in
trig field of iio_device structure. This needs to be stored in the
driver private data. Othewise it can result in crash during module
unload. Hence created a trig_ptr in the common data structure
for each HID sensor IIO driver and storing here.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

No differences found