summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-02-22 15:21:57 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-22 15:21:57 -0800
commit1a6a35894f10870d5590199d1785d3a718927abe (patch)
treeab3ab04b0ff2614ed7c322b31cbde9b6481addc1 /arch/arm/mach-ixp4xx/common.c
parent245599f573f302bfa27a0436408c80f13b457046 (diff)
parent06e4479bd092eca4125e5507e7c22619a491dab3 (diff)
downloadblackbird-op-linux-1a6a35894f10870d5590199d1785d3a718927abe.tar.gz
blackbird-op-linux-1a6a35894f10870d5590199d1785d3a718927abe.zip
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r--arch/arm/mach-ixp4xx/common.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 4bdc9d4526cd..fbadf3021b9e 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -111,24 +111,30 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
if (line < 0)
return -EINVAL;
- if (type & IRQT_BOTHEDGE) {
+ switch (type){
+ case IRQT_BOTHEDGE:
int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL;
irq_type = IXP4XX_IRQ_EDGE;
- } else if (type & IRQT_RISING) {
+ break;
+ case IRQT_RISING:
int_style = IXP4XX_GPIO_STYLE_RISING_EDGE;
irq_type = IXP4XX_IRQ_EDGE;
- } else if (type & IRQT_FALLING) {
+ break;
+ case IRQT_FALLING:
int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE;
irq_type = IXP4XX_IRQ_EDGE;
- } else if (type & IRQT_HIGH) {
+ break;
+ case IRQT_HIGH:
int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH;
irq_type = IXP4XX_IRQ_LEVEL;
- } else if (type & IRQT_LOW) {
+ break;
+ case IRQT_LOW:
int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW;
irq_type = IXP4XX_IRQ_LEVEL;
- } else
+ break;
+ default:
return -EINVAL;
-
+ }
ixp4xx_config_irq(irq, irq_type);
if (line >= 8) { /* pins 8-15 */
OpenPOWER on IntegriCloud