summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/max1363.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-01-31 21:43:00 (GMT)
committerJonathan Cameron <jic23@kernel.org>2013-02-02 12:02:20 (GMT)
commit6cb2afd7c0abb93bd9dc6d36b858b1e312e2407d (patch)
tree3abec8f4f092e6e594f4ce57069987c5618f67ff /drivers/iio/adc/max1363.c
parentca7d98dbd7db6aa8bc4b08e26be1249436d21af3 (diff)
downloadlinux-fsl-qoriq-6cb2afd7c0abb93bd9dc6d36b858b1e312e2407d.tar.xz
iio: Simplify iio_map_array_unregister API
Instead of requiring the map to unregister, simply unregister all map entries associated with the given iio device. This simplifies map removal and also works for maps generated through devicetree. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/adc/max1363.c')
-rw-r--r--drivers/iio/adc/max1363.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
index 4673238..ef868c9 100644
--- a/drivers/iio/adc/max1363.c
+++ b/drivers/iio/adc/max1363.c
@@ -1611,7 +1611,7 @@ error_disable_reg:
error_put_reg:
regulator_put(st->reg);
error_unregister_map:
- iio_map_array_unregister(indio_dev, client->dev.platform_data);
+ iio_map_array_unregister(indio_dev);
error_free_device:
iio_device_free(indio_dev);
error_out:
@@ -1630,7 +1630,7 @@ static int max1363_remove(struct i2c_client *client)
kfree(indio_dev->available_scan_masks);
regulator_disable(st->reg);
regulator_put(st->reg);
- iio_map_array_unregister(indio_dev, client->dev.platform_data);
+ iio_map_array_unregister(indio_dev);
iio_device_free(indio_dev);
return 0;