]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
authorMarek Vasut <marek.vasut@gmail.com>
Sat, 28 Mar 2009 09:56:28 +0000 (17:56 +0800)
committerEric Miao <eric.miao@marvell.com>
Sat, 28 Mar 2009 11:24:39 +0000 (19:24 +0800)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
drivers/pcmcia/pxa2xx_base.c
drivers/pcmcia/pxa2xx_palmld.c

index 16f84aab6ab3f02703b9a983a9986a063fbbd4c5..c49a7269f6d1a2b08fa6ec08076f22b28b45addd 100644 (file)
@@ -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);
index 1736c67e547ed5e05c78dde91afbb84364be234c..5ba9b3664a00abdf8eb5bab95c80cccb12ab2d31 100644 (file)
@@ -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,