From 110e4ec5a1cfe20190e7f8c2b8b4eef369de3c99 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 1 Mar 2012 18:48:33 -0700 Subject: 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 Acked-by: Dong Aisheng Signed-off-by: Linus Walleij --- arch/arm/mach-u300/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-u300') 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); -- cgit v1.2.1