diff options
-rw-r--r-- | arch/arm/mach-ep93xx/gpio.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index cf547ad7ebd4..f3dc76fdcea8 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -112,13 +112,13 @@ static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
112 | generic_handle_irq(gpio_irq); | 112 | generic_handle_irq(gpio_irq); |
113 | } | 113 | } |
114 | 114 | ||
115 | static void ep93xx_gpio_irq_ack(unsigned int irq) | 115 | static void ep93xx_gpio_irq_ack(struct irq_data *d) |
116 | { | 116 | { |
117 | int line = irq_to_gpio(irq); | 117 | int line = irq_to_gpio(d->irq); |
118 | int port = line >> 3; | 118 | int port = line >> 3; |
119 | int port_mask = 1 << (line & 7); | 119 | int port_mask = 1 << (line & 7); |
120 | 120 | ||
121 | if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { | 121 | if ((irq_desc[d->irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { |
122 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ | 122 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ |
123 | ep93xx_gpio_update_int_params(port); | 123 | ep93xx_gpio_update_int_params(port); |
124 | } | 124 | } |
@@ -126,13 +126,13 @@ static void ep93xx_gpio_irq_ack(unsigned int irq) | |||
126 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); | 126 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void ep93xx_gpio_irq_mask_ack(unsigned int irq) | 129 | static void ep93xx_gpio_irq_mask_ack(struct irq_data *d) |
130 | { | 130 | { |
131 | int line = irq_to_gpio(irq); | 131 | int line = irq_to_gpio(d->irq); |
132 | int port = line >> 3; | 132 | int port = line >> 3; |
133 | int port_mask = 1 << (line & 7); | 133 | int port_mask = 1 << (line & 7); |
134 | 134 | ||
135 | if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) | 135 | if ((irq_desc[d->irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) |
136 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ | 136 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ |
137 | 137 | ||
138 | gpio_int_unmasked[port] &= ~port_mask; | 138 | gpio_int_unmasked[port] &= ~port_mask; |
@@ -141,18 +141,18 @@ static void ep93xx_gpio_irq_mask_ack(unsigned int irq) | |||
141 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); | 141 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); |
142 | } | 142 | } |
143 | 143 | ||
144 | static void ep93xx_gpio_irq_mask(unsigned int irq) | 144 | static void ep93xx_gpio_irq_mask(struct irq_data *d) |
145 | { | 145 | { |
146 | int line = irq_to_gpio(irq); | 146 | int line = irq_to_gpio(d->irq); |
147 | int port = line >> 3; | 147 | int port = line >> 3; |
148 | 148 | ||
149 | gpio_int_unmasked[port] &= ~(1 << (line & 7)); | 149 | gpio_int_unmasked[port] &= ~(1 << (line & 7)); |
150 | ep93xx_gpio_update_int_params(port); | 150 | ep93xx_gpio_update_int_params(port); |
151 | } | 151 | } |
152 | 152 | ||
153 | static void ep93xx_gpio_irq_unmask(unsigned int irq) | 153 | static void ep93xx_gpio_irq_unmask(struct irq_data *d) |
154 | { | 154 | { |
155 | int line = irq_to_gpio(irq); | 155 | int line = irq_to_gpio(d->irq); |
156 | int port = line >> 3; | 156 | int port = line >> 3; |
157 | 157 | ||
158 | gpio_int_unmasked[port] |= 1 << (line & 7); | 158 | gpio_int_unmasked[port] |= 1 << (line & 7); |
@@ -164,10 +164,10 @@ static void ep93xx_gpio_irq_unmask(unsigned int irq) | |||
164 | * edge (1) triggered, while gpio_int_type2 controls whether it | 164 | * edge (1) triggered, while gpio_int_type2 controls whether it |
165 | * triggers on low/falling (0) or high/rising (1). | 165 | * triggers on low/falling (0) or high/rising (1). |
166 | */ | 166 | */ |
167 | static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type) | 167 | static int ep93xx_gpio_irq_type(struct irq_data *d, unsigned int type) |
168 | { | 168 | { |
169 | struct irq_desc *desc = irq_desc + irq; | 169 | struct irq_desc *desc = irq_desc + d->irq; |
170 | const int gpio = irq_to_gpio(irq); | 170 | const int gpio = irq_to_gpio(d->irq); |
171 | const int port = gpio >> 3; | 171 | const int port = gpio >> 3; |
172 | const int port_mask = 1 << (gpio & 7); | 172 | const int port_mask = 1 << (gpio & 7); |
173 | 173 | ||
@@ -220,11 +220,11 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type) | |||
220 | 220 | ||
221 | static struct irq_chip ep93xx_gpio_irq_chip = { | 221 | static struct irq_chip ep93xx_gpio_irq_chip = { |
222 | .name = "GPIO", | 222 | .name = "GPIO", |
223 | .ack = ep93xx_gpio_irq_ack, | 223 | .irq_ack = ep93xx_gpio_irq_ack, |
224 | .mask_ack = ep93xx_gpio_irq_mask_ack, | 224 | .irq_mask_ack = ep93xx_gpio_irq_mask_ack, |
225 | .mask = ep93xx_gpio_irq_mask, | 225 | .irq_mask = ep93xx_gpio_irq_mask, |
226 | .unmask = ep93xx_gpio_irq_unmask, | 226 | .irq_unmask = ep93xx_gpio_irq_unmask, |
227 | .set_type = ep93xx_gpio_irq_type, | 227 | .irq_set_type = ep93xx_gpio_irq_type, |
228 | }; | 228 | }; |
229 | 229 | ||
230 | void __init ep93xx_gpio_init_irq(void) | 230 | void __init ep93xx_gpio_init_irq(void) |