diff options
-rw-r--r-- | drivers/pinctrl/nomadik/pinctrl-nomadik.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index 9fe31daf9230..6c9667a44b7b 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c | |||
@@ -1339,17 +1339,6 @@ static void nmk_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s, | |||
1339 | nmk_gpio_dbg_show_one(s, pctldev, chip, offset - chip->base, offset); | 1339 | nmk_gpio_dbg_show_one(s, pctldev, chip, offset - chip->base, offset); |
1340 | } | 1340 | } |
1341 | 1341 | ||
1342 | static void nmk_pinctrl_dt_free_map(struct pinctrl_dev *pctldev, | ||
1343 | struct pinctrl_map *map, unsigned num_maps) | ||
1344 | { | ||
1345 | int i; | ||
1346 | |||
1347 | for (i = 0; i < num_maps; i++) | ||
1348 | if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN) | ||
1349 | kfree(map[i].data.configs.configs); | ||
1350 | kfree(map); | ||
1351 | } | ||
1352 | |||
1353 | static int nmk_dt_add_map_mux(struct pinctrl_map **map, unsigned *reserved_maps, | 1342 | static int nmk_dt_add_map_mux(struct pinctrl_map **map, unsigned *reserved_maps, |
1354 | unsigned *num_maps, const char *group, | 1343 | unsigned *num_maps, const char *group, |
1355 | const char *function) | 1344 | const char *function) |
@@ -1581,7 +1570,7 @@ static int nmk_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, | |||
1581 | ret = nmk_pinctrl_dt_subnode_to_map(pctldev, np, map, | 1570 | ret = nmk_pinctrl_dt_subnode_to_map(pctldev, np, map, |
1582 | &reserved_maps, num_maps); | 1571 | &reserved_maps, num_maps); |
1583 | if (ret < 0) { | 1572 | if (ret < 0) { |
1584 | nmk_pinctrl_dt_free_map(pctldev, *map, *num_maps); | 1573 | pinctrl_utils_dt_free_map(pctldev, *map, *num_maps); |
1585 | return ret; | 1574 | return ret; |
1586 | } | 1575 | } |
1587 | } | 1576 | } |
@@ -1595,7 +1584,7 @@ static const struct pinctrl_ops nmk_pinctrl_ops = { | |||
1595 | .get_group_pins = nmk_get_group_pins, | 1584 | .get_group_pins = nmk_get_group_pins, |
1596 | .pin_dbg_show = nmk_pin_dbg_show, | 1585 | .pin_dbg_show = nmk_pin_dbg_show, |
1597 | .dt_node_to_map = nmk_pinctrl_dt_node_to_map, | 1586 | .dt_node_to_map = nmk_pinctrl_dt_node_to_map, |
1598 | .dt_free_map = nmk_pinctrl_dt_free_map, | 1587 | .dt_free_map = pinctrl_utils_dt_free_map, |
1599 | }; | 1588 | }; |
1600 | 1589 | ||
1601 | static int nmk_pmx_get_funcs_cnt(struct pinctrl_dev *pctldev) | 1590 | static int nmk_pmx_get_funcs_cnt(struct pinctrl_dev *pctldev) |