aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/asic3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/asic3.c')
-rw-r--r--drivers/mfd/asic3.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 3b870e7fb3e1..c6408a62d95e 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -256,28 +256,28 @@ static int asic3_gpio_irq_type(unsigned int irq, unsigned int type)
256 bank + ASIC3_GPIO_TRIGGER_TYPE); 256 bank + ASIC3_GPIO_TRIGGER_TYPE);
257 asic->irq_bothedge[(irq - asic->irq_base) >> 4] &= ~bit; 257 asic->irq_bothedge[(irq - asic->irq_base) >> 4] &= ~bit;
258 258
259 if (type == IRQT_RISING) { 259 if (type == IRQ_TYPE_EDGE_RISING) {
260 trigger |= bit; 260 trigger |= bit;
261 edge |= bit; 261 edge |= bit;
262 } else if (type == IRQT_FALLING) { 262 } else if (type == IRQ_TYPE_EDGE_FALLING) {
263 trigger |= bit; 263 trigger |= bit;
264 edge &= ~bit; 264 edge &= ~bit;
265 } else if (type == IRQT_BOTHEDGE) { 265 } else if (type == IRQ_TYPE_EDGE_BOTH) {
266 trigger |= bit; 266 trigger |= bit;
267 if (asic3_gpio_get(&asic->gpio, irq - asic->irq_base)) 267 if (asic3_gpio_get(&asic->gpio, irq - asic->irq_base))
268 edge &= ~bit; 268 edge &= ~bit;
269 else 269 else
270 edge |= bit; 270 edge |= bit;
271 asic->irq_bothedge[(irq - asic->irq_base) >> 4] |= bit; 271 asic->irq_bothedge[(irq - asic->irq_base) >> 4] |= bit;
272 } else if (type == IRQT_LOW) { 272 } else if (type == IRQ_TYPE_LEVEL_LOW) {
273 trigger &= ~bit; 273 trigger &= ~bit;
274 level &= ~bit; 274 level &= ~bit;
275 } else if (type == IRQT_HIGH) { 275 } else if (type == IRQ_TYPE_LEVEL_HIGH) {
276 trigger &= ~bit; 276 trigger &= ~bit;
277 level |= bit; 277 level |= bit;
278 } else { 278 } else {
279 /* 279 /*
280 * if type == IRQT_NOEDGE, we should mask interrupts, but 280 * if type == IRQ_TYPE_NONE, we should mask interrupts, but
281 * be careful to not unmask them if mask was also called. 281 * be careful to not unmask them if mask was also called.
282 * Probably need internal state for mask. 282 * Probably need internal state for mask.
283 */ 283 */
@@ -314,10 +314,12 @@ static int __init asic3_irq_probe(struct platform_device *pdev)
314 unsigned long clksel = 0; 314 unsigned long clksel = 0;
315 unsigned int irq, irq_base; 315 unsigned int irq, irq_base;
316 int map_size; 316 int map_size;
317 int ret;
317 318
318 asic->irq_nr = platform_get_irq(pdev, 0); 319 ret = platform_get_irq(pdev, 0);
319 if (asic->irq_nr < 0) 320 if (ret < 0)
320 return asic->irq_nr; 321 return ret;
322 asic->irq_nr = ret;
321 323
322 /* turn on clock to IRQ controller */ 324 /* turn on clock to IRQ controller */
323 clksel |= CLOCK_SEL_CX; 325 clksel |= CLOCK_SEL_CX;
@@ -341,7 +343,7 @@ static int __init asic3_irq_probe(struct platform_device *pdev)
341 ASIC3_INTMASK_GINTMASK); 343 ASIC3_INTMASK_GINTMASK);
342 344
343 set_irq_chained_handler(asic->irq_nr, asic3_irq_demux); 345 set_irq_chained_handler(asic->irq_nr, asic3_irq_demux);
344 set_irq_type(asic->irq_nr, IRQT_RISING); 346 set_irq_type(asic->irq_nr, IRQ_TYPE_EDGE_RISING);
345 set_irq_data(asic->irq_nr, asic); 347 set_irq_data(asic->irq_nr, asic);
346 348
347 return 0; 349 return 0;