Re: [PATCH] gdth update

From: Christoph Hellwig
Date: Wed Sep 29 2004 - 09:28:35 EST


On Wed, Sep 29, 2004 at 03:43:01PM +0200, Jörn Engel wrote:
> On Wed, 29 September 2004 14:15:57 +0200, Leubner, Achim wrote:
> >
> > > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
> > > > +static irqreturn_t gdth_interrupt(int irq, void *dev_id, struct
> > pt_regs *regs);
> > > > #else
> > > > -static void gdth_interrupt(int irq,struct pt_regs *regs);
> > > > +static void gdth_interrupt(int irq, void *dev_id, struct pt_regs
> > *regs);
> > > > #endif
> > >
> > > this really is the wrong way to do such irq prototype compatibility in
> > > drivers. *really*
> > >
> > So please tell me what the right way should be. It works without any
> > problem.
>
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
> #define irqreturn_t void
> #define IRQ_NONE
> #define IRQ_HANDLED
> #endif

Actually all these are in recent 2.4.x release. So better check for
#ifndef IRQ_HANDLED.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/