2000-11-13 05:16:50

by Keith Owens

[permalink] [raw]
Subject: analog.c MODULE_PARM, attention Vojtech Pavlik

Originally sent to [email protected] but that host is not resolving.

drivers/char/joystick/analog.c in 2.4.0-test10 has these lines.

MODULE_PARM(js,"1-16s");

#define ANALOG_PORTS 16

static char *js[ANALOG_PORTS];
static int analog_options[ANALOG_PORTS];

Instead of hard coding 16 in MODULE_PARM, I recommend

#define ANALOG_PORTS 16

static char *js[ANALOG_PORTS];
static int analog_options[ANALOG_PORTS];
MODULE_PARM(js,"1-" __MODULE_STRING(ANALOG_PORTS) "s");