Version 2.12.17
[lttng-modules.git] / wrapper / irqdesc.h
index 4670fc6476db9bda4e0eced669117a9b0663af94..ce7da2b481f36f59ec95e66e87273737a0f1e616 100644 (file)
@@ -1,19 +1,33 @@
-#ifndef _LTTNG_WRAPPER_IRQDESC_H
-#define _LTTNG_WRAPPER_IRQDESC_H
-
-/*
- * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
+/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
+ *
+ * wrapper/irqdesc.h
  *
  * wrapper around irq_to_desc. Using KALLSYMS to get its address when
  * available, else we need to have a kernel that exports this function to GPL
  * modules.
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
+#ifndef _LTTNG_WRAPPER_IRQDESC_H
+#define _LTTNG_WRAPPER_IRQDESC_H
+
 #include <linux/interrupt.h>
 #include <linux/irqnr.h>
 
 struct irq_desc *wrapper_irq_to_desc(unsigned int irq);
 
+/*
+ * Canary function to check for 'irq_to_desc()' at compile time.
+ *
+ * From 'include/linux/irqnr.h':
+ *
+ *   extern struct irq_desc *irq_to_desc(unsigned int irq);
+ */
+static inline
+struct irq_desc *__canary__irq_to_desc(unsigned int irq)
+{
+       return irq_to_desc(irq);
+}
+
 #endif /* _LTTNG_WRAPPER_IRQDESC_H */
This page took 0.023648 seconds and 4 git commands to generate.