summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/max1363.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-02-01 01:43:00 +0400
committerJonathan Cameron <jic23@kernel.org>2013-02-02 16:02:20 +0400
commit6cb2afd7c0abb93bd9dc6d36b858b1e312e2407d (patch)
tree3abec8f4f092e6e594f4ce57069987c5618f67ff /drivers/iio/adc/max1363.c
parentca7d98dbd7db6aa8bc4b08e26be1249436d21af3 (diff)
downloadlinux-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 46732380566f..ef868c9c17be 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;