Commit a1ff541a authored by Jiang Liu's avatar Jiang Liu Committed by Thomas Gleixner

genirq: Remove irq arg from __irq_set_trigger()

It's only required for debug output and can be retrieved from the irq
descriptor if necessary.

[ tglx: Split out from combo patch ]
Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 0798abeb
...@@ -63,7 +63,7 @@ int irq_set_irq_type(unsigned int irq, unsigned int type) ...@@ -63,7 +63,7 @@ int irq_set_irq_type(unsigned int irq, unsigned int type)
return -EINVAL; return -EINVAL;
type &= IRQ_TYPE_SENSE_MASK; type &= IRQ_TYPE_SENSE_MASK;
ret = __irq_set_trigger(desc, irq, type); ret = __irq_set_trigger(desc, type);
irq_put_desc_busunlock(desc, flags); irq_put_desc_busunlock(desc, flags);
return ret; return ret;
} }
......
...@@ -59,8 +59,7 @@ enum { ...@@ -59,8 +59,7 @@ enum {
#include "debug.h" #include "debug.h"
#include "settings.h" #include "settings.h"
extern int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, extern int __irq_set_trigger(struct irq_desc *desc, unsigned long flags);
unsigned long flags);
extern void __disable_irq(struct irq_desc *desc, unsigned int irq); extern void __disable_irq(struct irq_desc *desc, unsigned int irq);
extern void __enable_irq(struct irq_desc *desc, unsigned int irq); extern void __enable_irq(struct irq_desc *desc, unsigned int irq);
......
...@@ -637,8 +637,7 @@ int can_request_irq(unsigned int irq, unsigned long irqflags) ...@@ -637,8 +637,7 @@ int can_request_irq(unsigned int irq, unsigned long irqflags)
return canrequest; return canrequest;
} }
int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, int __irq_set_trigger(struct irq_desc *desc, unsigned long flags)
unsigned long flags)
{ {
struct irq_chip *chip = desc->irq_data.chip; struct irq_chip *chip = desc->irq_data.chip;
int ret, unmask = 0; int ret, unmask = 0;
...@@ -648,7 +647,8 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, ...@@ -648,7 +647,8 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
* IRQF_TRIGGER_* but the PIC does not support multiple * IRQF_TRIGGER_* but the PIC does not support multiple
* flow-types? * flow-types?
*/ */
pr_debug("No set_type function for IRQ %d (%s)\n", irq, pr_debug("No set_type function for IRQ %d (%s)\n",
irq_desc_get_irq(desc),
chip ? (chip->name ? : "unknown") : "unknown"); chip ? (chip->name ? : "unknown") : "unknown");
return 0; return 0;
} }
...@@ -685,7 +685,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, ...@@ -685,7 +685,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
break; break;
default: default:
pr_err("Setting trigger mode %lu for irq %u failed (%pF)\n", pr_err("Setting trigger mode %lu for irq %u failed (%pF)\n",
flags, irq, chip->irq_set_type); flags, irq_desc_get_irq(desc), chip->irq_set_type);
} }
if (unmask) if (unmask)
unmask_irq(desc); unmask_irq(desc);
...@@ -1221,8 +1221,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) ...@@ -1221,8 +1221,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
/* Setup the type (level, edge polarity) if configured: */ /* Setup the type (level, edge polarity) if configured: */
if (new->flags & IRQF_TRIGGER_MASK) { if (new->flags & IRQF_TRIGGER_MASK) {
ret = __irq_set_trigger(desc, irq, ret = __irq_set_trigger(desc,
new->flags & IRQF_TRIGGER_MASK); new->flags & IRQF_TRIGGER_MASK);
if (ret) if (ret)
goto out_mask; goto out_mask;
...@@ -1650,7 +1650,7 @@ void enable_percpu_irq(unsigned int irq, unsigned int type) ...@@ -1650,7 +1650,7 @@ void enable_percpu_irq(unsigned int irq, unsigned int type)
if (type != IRQ_TYPE_NONE) { if (type != IRQ_TYPE_NONE) {
int ret; int ret;
ret = __irq_set_trigger(desc, irq, type); ret = __irq_set_trigger(desc, type);
if (ret) { if (ret) {
WARN(1, "failed to set type for IRQ%d\n", irq); WARN(1, "failed to set type for IRQ%d\n", irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment