]> git.karo-electronics.de Git - linux-beck.git/commit
pinctrl: mvebu: count unnamed controls and allocate name buffer
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Thu, 30 Jan 2014 22:38:12 +0000 (23:38 +0100)
committerSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tue, 25 Feb 2014 17:34:34 +0000 (18:34 +0100)
commit8d898fd5966caefb60aeb1ba6b33a3ff1b768db0
treec9921a2d76fa0bf41f6f8496d87e83bdc0d17d24
parent38dbfb59d1175ef458d006556061adeaa8751b72
pinctrl: mvebu: count unnamed controls and allocate name buffer

pinctrl-mvebu allows SoCs to pass unnamed controls that will get an
auto-generated name of "mpp<PIN#>". Currently, we are allocating name
buffers on a per-control basis while looping over passed controls.
This counts the total number of unnamed controls and allocates a
global name buffer instead. The new buffer is then used while assigning
controls to pinctrl groups later.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
drivers/pinctrl/mvebu/pinctrl-mvebu.c