summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-03-02 02:48:33 +0100
committerLinus Walleij <linus.walleij@linaro.org>2012-03-02 16:20:54 +0100
commit110e4ec5a1cfe20190e7f8c2b8b4eef369de3c99 (patch)
tree2e20b44478f47069ac19f0ef9f5a92bee7576bdd /arch
parentpinctrl: introduce PINCTRL_STATE_DEFAULT, define hogs as that state (diff)
downloadlinux-110e4ec5a1cfe20190e7f8c2b8b4eef369de3c99.tar.xz
linux-110e4ec5a1cfe20190e7f8c2b8b4eef369de3c99.zip
pinctrl: assume map table entries can't have a NULL name field
pinctrl_register_mappings() already requires that every mapping table entry have a non-NULL name field. Logically, this makes sense too; drivers should always request a specific named state so they know what they're getting. Relying on getting the first mentioned state in the mapping table is error-prone, and a nasty special case to implement, given that a given the mapping table may define multiple states for a device. Remove a small part of the documentation that talked about optionally requesting a specific state; it's mandatory now. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-u300/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index ea6c79076a91..f29565a10e2e 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -1612,9 +1612,9 @@ static struct pinctrl_map __initdata u300_pinmux_map[] = {
PIN_MAP_SYS_HOG("pinctrl-u300", "emif0"),
PIN_MAP_SYS_HOG("pinctrl-u300", "emif1"),
/* per-device maps for MMC/SD, SPI and UART */
- PIN_MAP("MMCSD", "pinctrl-u300", "mmc0", "mmci"),
- PIN_MAP("SPI", "pinctrl-u300", "spi0", "pl022"),
- PIN_MAP("UART0", "pinctrl-u300", "uart0", "uart0"),
+ PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "mmc0", "mmci"),
+ PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "spi0", "pl022"),
+ PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "uart0", "uart0"),
};
struct u300_mux_hog {
@@ -1646,7 +1646,7 @@ static int __init u300_pinctrl_fetch(void)
struct pinctrl *p;
int ret;
- p = pinctrl_get(u300_mux_hogs[i].dev, NULL);
+ p = pinctrl_get(u300_mux_hogs[i].dev, PINCTRL_STATE_DEFAULT);
if (IS_ERR(p)) {
pr_err("u300: could not get pinmux hog %s\n",
u300_mux_hogs[i].name);