summaryrefslogtreecommitdiff
path: root/drivers/iio/light/hid-sensor-als.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-03 04:39:07 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-03 04:39:07 +0400
commit06749f192b740651302a84273707d0b66749d126 (patch)
treef79f6bd1f8a8a0b63b624d78bedc5c00650f1383 /drivers/iio/light/hid-sensor-als.c
parent931cf48d2db64c67d0e917f55d7db7ab7b9fefa3 (diff)
parentdc1ccc48159d63eca5089e507c82c7d22ef60839 (diff)
downloadlinux-06749f192b740651302a84273707d0b66749d126.tar.xz
Merge v3.13-rc2 into staging-next
we want these fixes in here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/light/hid-sensor-als.c')
-rw-r--r--drivers/iio/light/hid-sensor-als.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
index 0c7f115ee3b3..621541fb10a9 100644
--- a/drivers/iio/light/hid-sensor-als.c
+++ b/drivers/iio/light/hid-sensor-als.c
@@ -325,7 +325,7 @@ static int hid_als_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev);
+ hid_sensor_remove_trigger(&als_state->common_attributes);
error_unreg_buffer_funcs:
iio_triggered_buffer_cleanup(indio_dev);
error_free_dev_mem:
@@ -338,10 +338,11 @@ static int hid_als_remove(struct platform_device *pdev)
{
struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
struct iio_dev *indio_dev = platform_get_drvdata(pdev);
+ struct als_state *als_state = iio_priv(indio_dev);
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ALS);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev);
+ hid_sensor_remove_trigger(&als_state->common_attributes);
iio_triggered_buffer_cleanup(indio_dev);
kfree(indio_dev->channels);