Solution 3
in 8390.h:
#if defined(CONFIG_MAC) || defined(CONFIG_AMIGA_PCMCIA) || \
defined(CONFIG_ARIADNE2) || defined(CONFIG_ARIADNE2_MODULE)
#define EI_SHIFT(x) (ei_local->reg_offset[x])
#define DECLARE_EI_LOCAL \
struct ei_device *ei_local = (struct ei_device *) dev->priv;
/* or, if similar declarations appear in many places:
DECLARE_EI_LOCAL(var, dev) \
struct ei_device *var = (struct ei_device *) (dev)->priv; */
#else
#define EI_SHIFT(x) (x)
#define DECLARE_EI_LOCAL
#endif
in 8390.c:
DECLARE_EI_LOCAL
Pros: no #ifdef in the .c file.
-
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/