|
@@ -719,15 +719,9 @@ void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc)
|
|
|
}
|
|
|
|
|
|
void
|
|
|
-__irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
|
|
|
- const char *name)
|
|
|
+__irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
|
|
|
+ int is_chained, const char *name)
|
|
|
{
|
|
|
- unsigned long flags;
|
|
|
- struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0);
|
|
|
-
|
|
|
- if (!desc)
|
|
|
- return;
|
|
|
-
|
|
|
if (!handle) {
|
|
|
handle = handle_bad_irq;
|
|
|
} else {
|
|
@@ -749,13 +743,13 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
|
|
|
* right away.
|
|
|
*/
|
|
|
if (WARN_ON(is_chained))
|
|
|
- goto out;
|
|
|
+ return;
|
|
|
/* Try the parent */
|
|
|
irq_data = irq_data->parent_data;
|
|
|
}
|
|
|
#endif
|
|
|
if (WARN_ON(!irq_data || irq_data->chip == &no_irq_chip))
|
|
|
- goto out;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
/* Uninstall? */
|
|
@@ -774,11 +768,40 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
|
|
|
irq_settings_set_nothread(desc);
|
|
|
irq_startup(desc, true);
|
|
|
}
|
|
|
-out:
|
|
|
+}
|
|
|
+
|
|
|
+void
|
|
|
+__irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
|
|
|
+ const char *name)
|
|
|
+{
|
|
|
+ unsigned long flags;
|
|
|
+ struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0);
|
|
|
+
|
|
|
+ if (!desc)
|
|
|
+ return;
|
|
|
+
|
|
|
+ __irq_do_set_handler(desc, handle, is_chained, name);
|
|
|
irq_put_desc_busunlock(desc, flags);
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(__irq_set_handler);
|
|
|
|
|
|
+void
|
|
|
+irq_set_chained_handler_and_data(unsigned int irq, irq_flow_handler_t handle,
|
|
|
+ void *data)
|
|
|
+{
|
|
|
+ unsigned long flags;
|
|
|
+ struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0);
|
|
|
+
|
|
|
+ if (!desc)
|
|
|
+ return;
|
|
|
+
|
|
|
+ __irq_do_set_handler(desc, handle, 1, NULL);
|
|
|
+ desc->irq_data.handler_data = data;
|
|
|
+
|
|
|
+ irq_put_desc_busunlock(desc, flags);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(irq_set_chained_handler_and_data);
|
|
|
+
|
|
|
void
|
|
|
irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
|
|
|
irq_flow_handler_t handle, const char *name)
|