Re: [PATCH] IRQ: ease out-of-tree migration to new irq_handler prototype

Alexey Dobriyan
2006-11-04T19:04:05Z

On Sat, Nov 04, 2006 at 10:29:37AM -0800, William D Waddington wrote:
> Ease out-of-tree driver migration to new irq_handler prototype.
> Define empty 3rd argument macro for use in multi kernel version
> out-of-tree drivers going forward. Backportable drives can do:
>
> (in a header)
> #ifndef __PT_REGS
> # define __PT_REGS , struct pt_regs *regs
> #endif

Backportable drivers should check kernel version themselves and define
__PT_REGS themselves.

> (in code body)
> static irqreturn_t irq_handler(int irq, void *dev_id __PT_REGS)

> +/*
> + * Irq handler migration helper - empty 3rd argument
> + * #define __PT_REGS , struct pt_regs *regs
> + * for older kernel versions
> + */
> +
> +#define __PT_REGS