X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=wrapper%2Firqdesc.h;h=ce7da2b481f36f59ec95e66e87273737a0f1e616;hb=2125da0d32f09c3c5b87dd8688c81fed641ac145;hp=4670fc6476db9bda4e0eced669117a9b0663af94;hpb=c337ddc219f608d4d35f461bdc9d2246324d6708;p=lttng-modules.git diff --git a/wrapper/irqdesc.h b/wrapper/irqdesc.h index 4670fc64..ce7da2b4 100644 --- a/wrapper/irqdesc.h +++ b/wrapper/irqdesc.h @@ -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 */ +#ifndef _LTTNG_WRAPPER_IRQDESC_H +#define _LTTNG_WRAPPER_IRQDESC_H + #include #include 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 */