aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-12-05 06:06:06 -0500
committerArnd Bergmann <arnd@arndb.de>2011-12-28 05:14:04 -0500
commit34641de2ef118b9c78a842fb75e6d3cc49c1de31 (patch)
tree9bb914f399203e1fba53f314f5cfe67d01aefcee /drivers/pcmcia
parente0bf102e1df73182e98c5ff96711b04534bc7bd9 (diff)
pcmcia: pxa: replace IRQ_GPIO() with gpio_to_irq()
Since commit 6384fd "ARM: pxa: rename IRQ_GPIO to PXA_GPIO_TO_IRQ", I got buid errors due to implicit declaration of function 'IRQ_GPIO'. Use common gpio_to_irq() to replace machine dependant macro IRQ_GPIO(). Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Ian Molton <spyro@f2s.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Cc: Zhuang <haojian.zhuang@marvell.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/pxa2xx_e740.c11
-rw-r--r--drivers/pcmcia/pxa2xx_palmld.c2
-rw-r--r--drivers/pcmcia/pxa2xx_palmtc.c2
-rw-r--r--drivers/pcmcia/pxa2xx_stargate2.c6
-rw-r--r--drivers/pcmcia/pxa2xx_trizeps4.c5
-rw-r--r--drivers/pcmcia/pxa2xx_vpac270.c4
6 files changed, 18 insertions, 12 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 @@
26static struct pcmcia_irqs cd_irqs[] = { 26static 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
39static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 37static 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}
diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.c
index d589ad1dcd4c..6a8e011a8c13 100644
--- a/drivers/pcmcia/pxa2xx_palmld.c
+++ b/drivers/pcmcia/pxa2xx_palmld.c
@@ -33,7 +33,7 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
33 ret = gpio_request_array(palmld_pcmcia_gpios, 33 ret = gpio_request_array(palmld_pcmcia_gpios,
34 ARRAY_SIZE(palmld_pcmcia_gpios)); 34 ARRAY_SIZE(palmld_pcmcia_gpios));
35 35
36 skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY); 36 skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMLD_PCMCIA_READY);
37 37
38 return ret; 38 return ret;
39} 39}
diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c
index 9c6a04b2f71b..9e38de769ba3 100644
--- a/drivers/pcmcia/pxa2xx_palmtc.c
+++ b/drivers/pcmcia/pxa2xx_palmtc.c
@@ -37,7 +37,7 @@ static int palmtc_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
37 ret = gpio_request_array(palmtc_pcmcia_gpios, 37 ret = gpio_request_array(palmtc_pcmcia_gpios,
38 ARRAY_SIZE(palmtc_pcmcia_gpios)); 38 ARRAY_SIZE(palmtc_pcmcia_gpios));
39 39
40 skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); 40 skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTC_PCMCIA_READY);
41 41
42 return ret; 42 return ret;
43} 43}
diff --git a/drivers/pcmcia/pxa2xx_stargate2.c b/drivers/pcmcia/pxa2xx_stargate2.c
index 939622251dfb..6c2366b74a35 100644
--- a/drivers/pcmcia/pxa2xx_stargate2.c
+++ b/drivers/pcmcia/pxa2xx_stargate2.c
@@ -34,7 +34,7 @@
34#define SG2_S0_GPIO_READY 81 34#define SG2_S0_GPIO_READY 81
35 35
36static struct pcmcia_irqs irqs[] = { 36static struct pcmcia_irqs irqs[] = {
37 { 0, IRQ_GPIO(SG2_S0_GPIO_DETECT), "PCMCIA0 CD" }, 37 {.sock = 0, .str = "PCMCIA0 CD" },
38}; 38};
39 39
40static struct gpio sg2_pcmcia_gpios[] = { 40static struct gpio sg2_pcmcia_gpios[] = {
@@ -44,7 +44,9 @@ static struct gpio sg2_pcmcia_gpios[] = {
44 44
45static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 45static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
46{ 46{
47 skt->socket.pci_irq = IRQ_GPIO(SG2_S0_GPIO_READY); 47 skt->socket.pci_irq = gpio_to_irq(SG2_S0_GPIO_READY);
48 irqs[0].irq = gpio_to_irq(SG2_S0_GPIO_DETECT);
49
48 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 50 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
49} 51}
50 52
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c
index 57ddb969d888..7c33f898135a 100644
--- a/drivers/pcmcia/pxa2xx_trizeps4.c
+++ b/drivers/pcmcia/pxa2xx_trizeps4.c
@@ -30,7 +30,7 @@
30extern void board_pcmcia_power(int power); 30extern void board_pcmcia_power(int power);
31 31
32static struct pcmcia_irqs irqs[] = { 32static struct pcmcia_irqs irqs[] = {
33 { 0, IRQ_GPIO(GPIO_PCD), "cs0_cd" } 33 { .sock = 0, .str = "cs0_cd" }
34 /* on other baseboards we can have more inputs */ 34 /* on other baseboards we can have more inputs */
35}; 35};
36 36
@@ -53,7 +53,8 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
53 gpio_free(GPIO_PRDY); 53 gpio_free(GPIO_PRDY);
54 return -EINVAL; 54 return -EINVAL;
55 } 55 }
56 skt->socket.pci_irq = IRQ_GPIO(GPIO_PRDY); 56 skt->socket.pci_irq = gpio_to_irq(GPIO_PRDY);
57 irqs[0].irq = gpio_to_irq(GPIO_PCD);
57 break; 58 break;
58 default: 59 default:
59 break; 60 break;
diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/drivers/pcmcia/pxa2xx_vpac270.c
index 66ab92cf3105..61b17d235dbe 100644
--- a/drivers/pcmcia/pxa2xx_vpac270.c
+++ b/drivers/pcmcia/pxa2xx_vpac270.c
@@ -38,12 +38,10 @@ static struct gpio vpac270_cf_gpios[] = {
38static struct pcmcia_irqs cd_irqs[] = { 38static struct pcmcia_irqs cd_irqs[] = {
39 { 39 {
40 .sock = 0, 40 .sock = 0,
41 .irq = IRQ_GPIO(GPIO84_VPAC270_PCMCIA_CD),
42 .str = "PCMCIA CD" 41 .str = "PCMCIA CD"
43 }, 42 },
44 { 43 {
45 .sock = 1, 44 .sock = 1,
46 .irq = IRQ_GPIO(GPIO17_VPAC270_CF_CD),
47 .str = "CF CD" 45 .str = "CF CD"
48 }, 46 },
49}; 47};
@@ -57,6 +55,7 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
57 ARRAY_SIZE(vpac270_pcmcia_gpios)); 55 ARRAY_SIZE(vpac270_pcmcia_gpios));
58 56
59 skt->socket.pci_irq = gpio_to_irq(GPIO35_VPAC270_PCMCIA_RDY); 57 skt->socket.pci_irq = gpio_to_irq(GPIO35_VPAC270_PCMCIA_RDY);
58 cd_irqs[0].irq = gpio_to_irq(GPIO84_VPAC270_PCMCIA_CD);
60 59
61 if (!ret) 60 if (!ret)
62 ret = soc_pcmcia_request_irqs(skt, &cd_irqs[0], 1); 61 ret = soc_pcmcia_request_irqs(skt, &cd_irqs[0], 1);
@@ -65,6 +64,7 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
65 ARRAY_SIZE(vpac270_cf_gpios)); 64 ARRAY_SIZE(vpac270_cf_gpios));
66 65
67 skt->socket.pci_irq = gpio_to_irq(GPIO12_VPAC270_CF_RDY); 66 skt->socket.pci_irq = gpio_to_irq(GPIO12_VPAC270_CF_RDY);
67 cd_irqs[1].irq = gpio_to_irq(GPIO17_VPAC270_CF_CD);
68 68
69 if (!ret) 69 if (!ret)
70 ret = soc_pcmcia_request_irqs(skt, &cd_irqs[1], 1); 70 ret = soc_pcmcia_request_irqs(skt, &cd_irqs[1], 1);