summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pxa2xx_base.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-03-28 17:56:28 +0800
committerEric Miao <eric.miao@marvell.com>2009-03-28 19:24:39 +0800
commitd66ea8d4c2aa7199cf4e5c977eb25764e5fc5da9 (patch)
treed27b7be3712edf39f655545c56eb9e68cff85337 /drivers/pcmcia/pxa2xx_base.c
parentc9b78189f50dcba6e69080268873a62c67e4bc15 (diff)
[ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'drivers/pcmcia/pxa2xx_base.c')
-rw-r--r--drivers/pcmcia/pxa2xx_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 16f84aab6ab..c49a7269f6d 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -214,7 +214,7 @@ static void pxa2xx_configure_sockets(struct device *dev)
MECR |= MECR_CIT;
/* Set MECR:NOS (Number Of Sockets) */
- if (ops->nr > 1 || machine_is_viper())
+ if ((ops->first + ops->nr) > 1 || machine_is_viper())
MECR |= MECR_NOS;
else
MECR &= ~MECR_NOS;
@@ -250,7 +250,7 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
for (i = 0; i < ops->nr; i++) {
skt = &sinfo->skt[i];
- skt->nr = i;
+ skt->nr = ops->first + i;
skt->irq = NO_IRQ;
skt->res_skt.start = _PCMCIA(skt->nr);