diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-03-01 20:48:33 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-03-02 10:20:54 -0500 |
commit | 110e4ec5a1cfe20190e7f8c2b8b4eef369de3c99 (patch) | |
tree | 2e20b44478f47069ac19f0ef9f5a92bee7576bdd /arch/arm/mach-u300 | |
parent | 46919ae63d4820e76724beb655274ce143f0da0b (diff) |
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/arm/mach-u300')
-rw-r--r-- | arch/arm/mach-u300/core.c | 8 |
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[] = { | |||
1612 | PIN_MAP_SYS_HOG("pinctrl-u300", "emif0"), | 1612 | PIN_MAP_SYS_HOG("pinctrl-u300", "emif0"), |
1613 | PIN_MAP_SYS_HOG("pinctrl-u300", "emif1"), | 1613 | PIN_MAP_SYS_HOG("pinctrl-u300", "emif1"), |
1614 | /* per-device maps for MMC/SD, SPI and UART */ | 1614 | /* per-device maps for MMC/SD, SPI and UART */ |
1615 | PIN_MAP("MMCSD", "pinctrl-u300", "mmc0", "mmci"), | 1615 | PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "mmc0", "mmci"), |
1616 | PIN_MAP("SPI", "pinctrl-u300", "spi0", "pl022"), | 1616 | PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "spi0", "pl022"), |
1617 | PIN_MAP("UART0", "pinctrl-u300", "uart0", "uart0"), | 1617 | PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "uart0", "uart0"), |
1618 | }; | 1618 | }; |
1619 | 1619 | ||
1620 | struct u300_mux_hog { | 1620 | struct u300_mux_hog { |
@@ -1646,7 +1646,7 @@ static int __init u300_pinctrl_fetch(void) | |||
1646 | struct pinctrl *p; | 1646 | struct pinctrl *p; |
1647 | int ret; | 1647 | int ret; |
1648 | 1648 | ||
1649 | p = pinctrl_get(u300_mux_hogs[i].dev, NULL); | 1649 | p = pinctrl_get(u300_mux_hogs[i].dev, PINCTRL_STATE_DEFAULT); |
1650 | if (IS_ERR(p)) { | 1650 | if (IS_ERR(p)) { |
1651 | pr_err("u300: could not get pinmux hog %s\n", | 1651 | pr_err("u300: could not get pinmux hog %s\n", |
1652 | u300_mux_hogs[i].name); | 1652 | u300_mux_hogs[i].name); |