diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-25 15:50:11 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-25 15:50:11 -0500 |
commit | 1676587bca910f805515afe418c1792592c0c8ae (patch) | |
tree | d3c43efd588875e625a01dca05c654c6403104a4 /drivers/iio/light/hid-sensor-als.c | |
parent | 5fa9576a1b975910d975f6535fdcddc79f6adf17 (diff) | |
parent | 0ee005c7dc2803125275e24598f0fb37775a6af3 (diff) |
Merge tag 'fixes-for-3.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
First round of fixes for IIO in the 3.13 cycle.
The usual mixed bag of fixes.
* 3 cases where kconfig dependencies were missing. We need to keep a closer
eye on this in new drivers.
* hid_sensors was abusing the iio_dev->trigger pointer. We had a round
of clearing this out some time ago but this driver clearly slipped through.
* A misuse of the IIO_ST macro, in mcp3422, which we should really make a
concertive effort to finish removing.
* Avoid a double free introduced by recent buffer reference counting in the
one driver that (quite reasonably!) does things differently (am335x)
* A missing mutex_unlock in kxsd9 that means that driver has been non
functional for some time and no one noticed (including me who for once
actually has one of the supported devices).
* An incorrect assumption about the parameters of sign_extend32 in mcp3422.
So nothing controversial. The only substantial patch is the hid_sensors
one and that is actually just adding a new pointer to the devices private
state then moving the code over to it.
Diffstat (limited to 'drivers/iio/light/hid-sensor-als.c')
-rw-r--r-- | drivers/iio/light/hid-sensor-als.c | 5 |
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 fa6ae8cf89ea..8e8b9d722853 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c | |||
@@ -314,7 +314,7 @@ static int hid_als_probe(struct platform_device *pdev) | |||
314 | error_iio_unreg: | 314 | error_iio_unreg: |
315 | iio_device_unregister(indio_dev); | 315 | iio_device_unregister(indio_dev); |
316 | error_remove_trigger: | 316 | error_remove_trigger: |
317 | hid_sensor_remove_trigger(indio_dev); | 317 | hid_sensor_remove_trigger(&als_state->common_attributes); |
318 | error_unreg_buffer_funcs: | 318 | error_unreg_buffer_funcs: |
319 | iio_triggered_buffer_cleanup(indio_dev); | 319 | iio_triggered_buffer_cleanup(indio_dev); |
320 | error_free_dev_mem: | 320 | error_free_dev_mem: |
@@ -327,10 +327,11 @@ static int hid_als_remove(struct platform_device *pdev) | |||
327 | { | 327 | { |
328 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 328 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
329 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 329 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
330 | struct als_state *als_state = iio_priv(indio_dev); | ||
330 | 331 | ||
331 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ALS); | 332 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ALS); |
332 | iio_device_unregister(indio_dev); | 333 | iio_device_unregister(indio_dev); |
333 | hid_sensor_remove_trigger(indio_dev); | 334 | hid_sensor_remove_trigger(&als_state->common_attributes); |
334 | iio_triggered_buffer_cleanup(indio_dev); | 335 | iio_triggered_buffer_cleanup(indio_dev); |
335 | kfree(indio_dev->channels); | 336 | kfree(indio_dev->channels); |
336 | 337 | ||