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>
This commit is contained in:

committed by
Jonathan Cameron

parent
ca7d98dbd7
commit
6cb2afd7c0
@@ -22,13 +22,10 @@ int iio_map_array_register(struct iio_dev *indio_dev,
|
||||
struct iio_map *map);
|
||||
|
||||
/**
|
||||
* iio_map_array_unregister() - tell the core to remove consumer mappings
|
||||
* iio_map_array_unregister() - tell the core to remove consumer mappings for
|
||||
* the given provider device
|
||||
* @indio_dev: provider device
|
||||
* @map: array of mappings to remove. Note these must have same memory
|
||||
* addresses as those originally added not just equal parameter
|
||||
* values.
|
||||
*/
|
||||
int iio_map_array_unregister(struct iio_dev *indio_dev,
|
||||
struct iio_map *map);
|
||||
int iio_map_array_unregister(struct iio_dev *indio_dev);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user