2003-07-10 05:10:34

by Mikael Starvik

[permalink] [raw]
Subject: RE: CRIS architecture update

Ok, do you have any other suggestion on how to make the driver
compilable for both >= 2.4.20 and < 2.4.20?

/Mikael

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Greg KH
Sent: Wednesday, July 09, 2003 10:15 PM
To: Linux Kernel Mailing List
Subject: Re: CRIS architecture update


> diff -Nru a/arch/cris/drivers/usb-host.c b/arch/cris/drivers/usb-host.c
> --- a/arch/cris/drivers/usb-host.c Wed Jul 9 12:06:00 2003
> +++ b/arch/cris/drivers/usb-host.c Wed Jul 9 12:06:00 2003
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 4, 20)
> +typedef struct urb urb_t, *purb_t;
> +typedef struct iso_packet_descriptor iso_packet_descriptor_t; typedef
> +struct usb_ctrlrequest devrequest; #endif

ICK ICK ICK! Please do not do this. These typedefs were removed for a
reason!

greg k-h


2003-07-10 17:03:17

by Greg KH

[permalink] [raw]
Subject: Re: CRIS architecture update

On Thu, Jul 10, 2003 at 10:13:41AM -0700, Greg KH wrote:
> On Thu, Jul 10, 2003 at 07:24:58AM +0200, Mikael Starvik wrote:
> > Ok, do you have any other suggestion on how to make the driver
> > compilable for both >= 2.4.20 and < 2.4.20?
>
> As the driver is _in_ the kernel tree, why does it need to be compilable
> for older kernels? :)

Speaking of older kernels, any chances for a 2.5 update? I know the
CRIS USB host controller driver has fallen pretty out of date with the
rest of the USB core, and would hope to see that sync up sometime.

thanks,

greg k-h

2003-07-10 17:03:26

by Greg KH

[permalink] [raw]
Subject: Re: CRIS architecture update

On Thu, Jul 10, 2003 at 07:24:58AM +0200, Mikael Starvik wrote:
> Ok, do you have any other suggestion on how to make the driver
> compilable for both >= 2.4.20 and < 2.4.20?

As the driver is _in_ the kernel tree, why does it need to be compilable
for older kernels? :)

Anyway, yes, just use the structure name, not the typedef. That is
backwards compatible.

For example, don't use "urb_t" but instead, "struct urb".

Hm, I think I did actually change one of the structure names, but I
don't think you use that structure in the host controller.

Hope this helps,

greg k-h