2004-09-29 14:32:00

by Leubner, Achim

[permalink] [raw]
Subject: RE: [PATCH] gdth update

Ok, thanks to all. I will make the proposed changes in the next version.

> -----Original Message-----
> From: Christoph Hellwig [mailto:[email protected]]
> Sent: Mittwoch, 29. September 2004 16:21
> To: J?rn Engel
> Cc: Leubner, Achim; [email protected]; Linux Kernel Mailing List
> Subject: Re: [PATCH] gdth update
>
> 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.