Skip to content

Commit

Permalink
[ARM] pxa: fix the bad assumption that PCMCIA sockets always start wi…
Browse files Browse the repository at this point in the history
…th 0

Signed-off-by: Marek Vasut <[email protected]>
Signed-off-by: Eric Miao <[email protected]>
  • Loading branch information
marex authored and Eric Miao committed Mar 28, 2009
1 parent c9b7818 commit d66ea8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/pcmcia/pxa2xx_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/pcmcia/pxa2xx_palmld.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ static void palmld_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
static struct pcmcia_low_level palmld_pcmcia_ops = {
.owner = THIS_MODULE,

.first = 0,
.nr = 2,
.first = 1,
.nr = 1,

.hw_init = palmld_pcmcia_hw_init,
.hw_shutdown = palmld_pcmcia_hw_shutdown,
Expand Down

0 comments on commit d66ea8d

Please sign in to comment.