]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: correct a offset while enumerating pins
authorChanho Park <chanho61.park@samsung.com>
Tue, 3 Jan 2012 07:47:50 +0000 (16:47 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 3 Jan 2012 08:10:09 +0000 (09:10 +0100)
commit894696a13fcda21165af29e67a9f553f6dcc6d47
tree68b0f77fc1f3b92be3e905e36f14e184403d0b67
parentea7e3d1155c753cb32d8ea7b87d366ed2e0f972e
pinctrl: correct a offset while enumerating pins

This patch modifies a offset while enumerating pins to support a
partial pin space. If we use a pin number for enumerating pins,
the pin space always starts with zero base. Indeed, we always check
the pin is in the pin space. An extreme example, there is only two pins.
One is 0. Another is 1000. We always enumerate whole offsets until 1000.
For solving this problem, we use the offset of the pin array instead
of the zero-based pin number.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[Restored sparse pin space comment]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c
drivers/pinctrl/pinconf.c
drivers/pinctrl/pinmux.c