linux/drivers/pinctrl/sunxi
Chen-Yu Tsai 88f01a1bd0 pinctrl: sunxi: Free configs in pinctrl_map only if it is a config map
In the recently refactored sunxi pinctrl library, we are only allocating
one set of pin configs for each pinmux setting node. When the pinctrl_map
structure is freed, the pin configs should also be freed. However the
code assumed the first map would contain the configs, which actually
never happens, as the mux function map gets added first.

The proper way to do this is to look through all the maps and free the
first one whose type is actually PIN_MAP_TYPE_CONFIGS_GROUP.

Also slightly expand the comment explaining this.

Fixes: f233dbca62 ("pinctrl: sunxi: Rework the pin config building code")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-11-15 10:15:04 +01:00
..
Kconfig pinctrl: sunxi: Add GR8 controller support 2016-09-07 21:15:49 +02:00
Makefile pinctrl: sunxi: Add GR8 controller support 2016-09-07 21:15:49 +02:00
pinctrl-gr8.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun4i-a10.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun5i-a10s.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun5i-a13.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31-r.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun6i-a31s.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun7i-a20.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a23-r.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a23.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a33.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-a83t.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun8i-h3-r.c pinctrl: sunxi: Add H3 R_PIO controller support 2016-02-11 14:29:24 +01:00
pinctrl-sun8i-h3.c pinctrl: sunxi: Remove unsupported PWM channel pinmux in H3 2016-09-08 01:08:23 +02:00
pinctrl-sun9i-a80-r.c pinctrl: sunxi: make A80 explicitly non-modular 2016-03-09 10:27:25 +07:00
pinctrl-sun9i-a80.c pinctrl: sunxi: make bool drivers explicitly non-modular 2016-11-04 23:25:34 +01:00
pinctrl-sun50i-a64.c drivers: pinctrl: add driver for Allwinner A64 SoC 2016-03-11 22:46:27 +07:00
pinctrl-sunxi.c pinctrl: sunxi: Free configs in pinctrl_map only if it is a config map 2016-11-15 10:15:04 +01:00
pinctrl-sunxi.h pinctrl: sunxi: Fix A33 external interrupts not working 2016-03-30 10:57:52 +02:00