diff mbox

[RFC,06/13] pinctrl: pinconf: Add generic helper function for freeing mappings

Message ID 1466165027-17917-7-git-send-email-jonathanh@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jon Hunter June 17, 2016, 12:03 p.m. UTC
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>
---
 drivers/pinctrl/pinconf-generic.c       | 8 ++++++++
 include/linux/pinctrl/pinconf-generic.h | 2 ++
 2 files changed, 10 insertions(+)

Comments

Linus Walleij June 18, 2016, 9:04 a.m. UTC | #1
On Fri, Jun 17, 2016 at 2:03 PM, Jon Hunter <jonathanh@nvidia.com> wrote:

> 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>

Looks reasonable. Can I apply it in isolation or do you need to keep
it in your series with my ACK?

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Jon Hunter June 20, 2016, 9:26 a.m. UTC | #2
On 18/06/16 10:04, Linus Walleij wrote:
> On Fri, Jun 17, 2016 at 2:03 PM, Jon Hunter <jonathanh@nvidia.com> wrote:
> 
>> 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>
> 
> Looks reasonable. Can I apply it in isolation or do you need to keep
> it in your series with my ACK?

There is definitely a build dependency on this patch for the DPAUX
driver. Thierry was suggesting (in response to patch 00/13) that he take
this through the drm/tegra branch if you are ok with that?

> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks.
Jon
diff mbox

Patch

diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 34b601b06764..5020ae534479 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -395,4 +395,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
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index d921afd5f109..12343caa114e 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -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,