diff options
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index d663338cb4a8..5203a599d211 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -111,9 +111,9 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip) | |||
111 | EXPORT_SYMBOL(set_irq_chip); | 111 | EXPORT_SYMBOL(set_irq_chip); |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * set_irq_type - set the irq type for an irq | 114 | * set_irq_type - set the irq trigger type for an irq |
115 | * @irq: irq number | 115 | * @irq: irq number |
116 | * @type: interrupt type - see include/linux/interrupt.h | 116 | * @type: IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h |
117 | */ | 117 | */ |
118 | int set_irq_type(unsigned int irq, unsigned int type) | 118 | int set_irq_type(unsigned int irq, unsigned int type) |
119 | { | 119 | { |
@@ -127,11 +127,12 @@ int set_irq_type(unsigned int irq, unsigned int type) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | desc = irq_desc + irq; | 129 | desc = irq_desc + irq; |
130 | if (desc->chip->set_type) { | 130 | if (type == IRQ_TYPE_NONE) |
131 | spin_lock_irqsave(&desc->lock, flags); | 131 | return 0; |
132 | ret = desc->chip->set_type(irq, type); | 132 | |
133 | spin_unlock_irqrestore(&desc->lock, flags); | 133 | spin_lock_irqsave(&desc->lock, flags); |
134 | } | 134 | ret = __irq_set_trigger(desc, irq, flags); |
135 | spin_unlock_irqrestore(&desc->lock, flags); | ||
135 | return ret; | 136 | return ret; |
136 | } | 137 | } |
137 | EXPORT_SYMBOL(set_irq_type); | 138 | EXPORT_SYMBOL(set_irq_type); |