aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/sa1111_neponset.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2016-09-02 05:14:20 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2016-09-12 05:57:01 -0400
commit3f8df892b2312011f2ba73aedc0a192d70b8844e (patch)
tree1cf5ab57ba1d5d5c002a697a18454953fba1e701 /drivers/pcmcia/sa1111_neponset.c
parenta466ebd2fc6a793e55f028a008b9f094d7d30fe3 (diff)
pcmcia: sa1111: fix propagation of lowlevel board init return code
When testing Lubbock, it was noticed that the sa1111 pcmcia driver bound but was not functional due to no sockets being registered. This is because the return code from the lowlevel board initialisation was not being propagated out of the probe function. Fix this. Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/pcmcia/sa1111_neponset.c')
-rw-r--r--drivers/pcmcia/sa1111_neponset.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/pcmcia/sa1111_neponset.c b/drivers/pcmcia/sa1111_neponset.c
index 1d78739c4c07..019c395eb4bf 100644
--- a/drivers/pcmcia/sa1111_neponset.c
+++ b/drivers/pcmcia/sa1111_neponset.c
@@ -110,20 +110,14 @@ static struct pcmcia_low_level neponset_pcmcia_ops = {
110 110
111int pcmcia_neponset_init(struct sa1111_dev *sadev) 111int pcmcia_neponset_init(struct sa1111_dev *sadev)
112{ 112{
113 int ret = -ENODEV; 113 /*
114 114 * Set GPIO_A<3:0> to be outputs for the MAX1600,
115 if (machine_is_assabet()) { 115 * and switch to standby mode.
116 /* 116 */
117 * Set GPIO_A<3:0> to be outputs for the MAX1600, 117 sa1111_set_io_dir(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0, 0);
118 * and switch to standby mode. 118 sa1111_set_io(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0);
119 */ 119 sa1111_set_sleep_io(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0);
120 sa1111_set_io_dir(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0, 0); 120 sa11xx_drv_pcmcia_ops(&neponset_pcmcia_ops);
121 sa1111_set_io(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0); 121 return sa1111_pcmcia_add(sadev, &neponset_pcmcia_ops,
122 sa1111_set_sleep_io(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0); 122 sa11xx_drv_pcmcia_add_one);
123 sa11xx_drv_pcmcia_ops(&neponset_pcmcia_ops);
124 ret = sa1111_pcmcia_add(sadev, &neponset_pcmcia_ops,
125 sa11xx_drv_pcmcia_add_one);
126 }
127
128 return ret;
129} 123}