Re: patch for maestro 2E for Linux 2.3.33

Keith Owens (kaos@ocs.com.au)
Fri, 17 Dec 1999 00:45:47 +1100


On Wed, 15 Dec 1999 17:00:19 +0100,
Serge Robyns <serge.robyns@advalvas.be> wrote:
>This is a patch to port Zach's maestro driver V 0.13 to the 2.3.33 kernel.
>--- maestro.c Thu Nov 18 19:29:12 1999
>+++ maestro-2.3.33.c Wed Dec 15 16:41:29 1999
>@@ -195,6 +195,12 @@
>
> #else
>
>+ #ifdef MODULE
>+ #include <linux/module.h>
>+ #ifdef MODVERSIONS
>+ #include <linux/modversions.h>
>+ #endif
>+ #endif
> #define SILLY_PCI_BASE_ADDRESS(PCIDEV) (PCIDEV->resource[0].start)

Do not wrap #include <linux/module.h> in #ifdef MODULE, module.h must
be included in anything that uses module symbols *or* exports symbols.
In the latter case it can be a module or built in.

Also never include modversions yourself, module.h does it when you set
the correct flags in the Makefile. Specifically the object must be
defined as OX_OBJ or MX_OBJ (X for export symbol) in the Makefile and
everything happens magically and correctly. A quick check of maestro.c
shows no EXPORT_SYMBOL so there is no need to define it as OX or MX,
just [OM]_OBJ will do.

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