diff options
Diffstat (limited to 'drivers/pcmcia/pxa2xx_e740.c')
-rw-r--r-- | drivers/pcmcia/pxa2xx_e740.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/pcmcia/pxa2xx_e740.c b/drivers/pcmcia/pxa2xx_e740.c index 8bfbd4dca131..17cd2ce7428f 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/drivers/pcmcia/pxa2xx_e740.c | |||
@@ -26,20 +26,23 @@ | |||
26 | static struct pcmcia_irqs cd_irqs[] = { | 26 | static struct pcmcia_irqs cd_irqs[] = { |
27 | { | 27 | { |
28 | .sock = 0, | 28 | .sock = 0, |
29 | .irq = IRQ_GPIO(GPIO_E740_PCMCIA_CD0), | ||
30 | .str = "CF card detect" | 29 | .str = "CF card detect" |
31 | }, | 30 | }, |
32 | { | 31 | { |
33 | .sock = 1, | 32 | .sock = 1, |
34 | .irq = IRQ_GPIO(GPIO_E740_PCMCIA_CD1), | ||
35 | .str = "Wifi switch" | 33 | .str = "Wifi switch" |
36 | }, | 34 | }, |
37 | }; | 35 | }; |
38 | 36 | ||
39 | static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 37 | static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
40 | { | 38 | { |
41 | skt->socket.pci_irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) : | 39 | if (skt->nr == 0) |
42 | IRQ_GPIO(GPIO_E740_PCMCIA_RDY1); | 40 | skt->socket.pci_irq = gpio_to_irq(GPIO_E740_PCMCIA_RDY0); |
41 | else | ||
42 | skt->socket.pci_irq = gpio_to_irq(GPIO_E740_PCMCIA_RDY1); | ||
43 | |||
44 | cd_irqs[0].irq = gpio_to_irq(GPIO_E740_PCMCIA_CD0); | ||
45 | cd_irqs[1].irq = gpio_to_irq(GPIO_E740_PCMCIA_CD1); | ||
43 | 46 | ||
44 | return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1); | 47 | return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1); |
45 | } | 48 | } |