pinctrl: pinconf: Add generic helper function for freeing mappings
authorJon Hunter <jonathanh@nvidia.com>
Fri, 17 Jun 2016 12:03:40 +0000 (13:03 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 23 Jun 2016 09:18:56 +0000 (11:18 +0200)
The pinconf-generic.h file exposes functions for creating generic mappings
but it does not expose a function for freeing the mappings. Add a function
for freeing generic mappings.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinconf-generic.c
include/linux/pinctrl/pinconf-generic.h

index d5bf9fae2ddd425cf32570b668a2c0a5b3aec59f..a87439ee4cdd1da81d40926560c8d9ca89b1285f 100644 (file)
@@ -391,4 +391,12 @@ exit:
 }
 EXPORT_SYMBOL_GPL(pinconf_generic_dt_node_to_map);
 
+void pinconf_generic_dt_free_map(struct pinctrl_dev *pctldev,
+                                struct pinctrl_map *map,
+                                unsigned num_maps)
+{
+       pinctrl_utils_free_map(pctldev, map, num_maps);
+}
+EXPORT_SYMBOL_GPL(pinconf_generic_dt_free_map);
+
 #endif
index d921afd5f10907c8d8058c0136463f6fcf54f345..12343caa114ef3ec27a5ab5a3caaf5320cbe6508 100644 (file)
@@ -175,6 +175,8 @@ int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
 int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev,
                struct device_node *np_config, struct pinctrl_map **map,
                unsigned *num_maps, enum pinctrl_map_type type);
+void pinconf_generic_dt_free_map(struct pinctrl_dev *pctldev,
+               struct pinctrl_map *map, unsigned num_maps);
 
 static inline int pinconf_generic_dt_node_to_map_group(
                struct pinctrl_dev *pctldev, struct device_node *np_config,