On Sun, Aug 20, 2000 at 11:45:46AM +0200, Franz Sirl wrote: > On Sun, 20 Aug 2000, Theodore Ts'o wrote: > > * netfilter doesn't compile correctly (test7-pre3, reported by Pau > > Aliagas) > > * If all the ISO NLS's are modules, there can be an undefined ref to > > CONFIG_NLS_DEFAULT in inode.c (Dale Amon) > * joystick drivers based on the input drivers cannot be configured/compiled > without CONFIG_USB set. Patch moving the input drivers (by James Simmons) > pending. > > Just to make sure this doesn't get lost. And here it goes, in a minimalised version as a script and a patch. Also attached is a patch that adds needed #ifdefs to iforce.c so that it's not dependent on USB when it doesn't use it. To apply this, first run the moveinput.sh script and then patch the resulting kernel with the moveinput.diff patch. Also apply the iforce.c.diff to finish the move. Linus: Please apply this. It may not seem completely necessary at first glance, but this is the, but I couldn't find any way to fix the problem of both USB and joystick drivers needing the common input stuff without some extremely ugly stuff in Makefiles and Config.ins. Also, I believe that this move will be good for the future. -- Vojtech Pavlik SuSE Labs
diff -urN linux-2.4.0-test7-pre5-moved/Makefile linux/Makefile
--- linux-2.4.0-test7-pre5-moved/Makefile Sat Aug 19 09:09:12 2000
+++ linux/Makefile Sat Aug 19 09:35:04 2000
@@ -169,6 +169,7 @@
DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
+DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
DRIVERS-$(CONFIG_I2O) += drivers/i2o/i2o.o
DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
diff -urN linux-2.4.0-test7-pre5-moved/drivers/Makefile linux/drivers/Makefile
--- linux-2.4.0-test7-pre5-moved/drivers/Makefile Sun Aug 6 20:23:40 2000
+++ linux/drivers/Makefile Sat Aug 19 09:35:40 2000
@@ -12,7 +12,7 @@
ALL_SUB_DIRS := $(SUB_DIRS) pci sgi ide scsi sbus cdrom isdn pnp i2o \
ieee1394 macintosh video dio zorro fc4 \
usb nubus tc atm pcmcia i2c telephony \
- acpi mtd
+ acpi mtd input
ifdef CONFIG_DIO
SUB_DIRS += dio
@@ -76,6 +76,15 @@
MOD_SUB_DIRS += usb
endif
endif
+
+ifeq ($(CONFIG_INPUT),y)
+SUB_DIRS += input
+MOD_SUB_DIRS += input
+else
+ ifeq ($(CONFIG_INPUT),m)
+ MOD_SUB_DIRS += input
+ endif
+endif
ifeq ($(CONFIG_PHONE),y)
SUB_DIRS += telephony
diff -urN linux-2.4.0-test7-pre5-moved/drivers/char/Makefile linux/drivers/char/Makefile
--- linux-2.4.0-test7-pre5-moved/drivers/char/Makefile Sat Aug 19 09:04:23 2000
+++ linux/drivers/char/Makefile Sat Aug 19 09:43:16 2000
@@ -23,7 +23,7 @@
SUB_DIRS :=
MOD_SUB_DIRS := $(SUB_DIRS)
-ALL_SUB_DIRS := $(SUB_DIRS) ftape joystick pcmcia rio drm agp
+ALL_SUB_DIRS := $(SUB_DIRS) ftape pcmcia rio drm agp
#
# This file contains the font map for the default (hardware) font
@@ -142,16 +142,6 @@
obj-$(CONFIG_ATIXL_BUSMOUSE) += atixlmouse.o
obj-$(CONFIG_LOGIBUSMOUSE) += logibusmouse.o
obj-$(CONFIG_PRINTER) += lp.o
-
-ifeq ($(CONFIG_JOYSTICK),y)
-obj-y += joystick/js.o
-SUB_DIRS += joystick
-MOD_SUB_DIRS += joystick
-else
- ifeq ($(CONFIG_JOYSTICK),m)
- MOD_SUB_DIRS += joystick
- endif
-endif
obj-$(CONFIG_BUSMOUSE) += busmouse.o
obj-$(CONFIG_DTLK) += dtlk.o
diff -urN linux-2.4.0-test7-pre5-moved/drivers/char/joystick/Config.in linux/drivers/char/joystick/Config.in
--- linux-2.4.0-test7-pre5-moved/drivers/char/joystick/Config.in Sat Aug 19 09:04:23 2000
+++ linux/drivers/char/joystick/Config.in Sat Aug 19 12:08:44 2000
@@ -7,7 +7,8 @@
tristate 'Joystick support' CONFIG_JOYSTICK
if [ "$CONFIG_JOYSTICK" != "n" ]; then
- define_tristate CONFIG_INPUT_JOYDEV $CONFIG_JOYSTICK
+
+ define_bool CONFIG_INPUT y
comment 'Game port support'
dep_tristate ' ns558 gameports' CONFIG_INPUT_NS558 $CONFIG_JOYSTICK
@@ -34,9 +35,6 @@
dep_tristate ' SpaceTec SpaceOrb/Avenger 6dof controller' CONFIG_INPUT_SPACEORB $CONFIG_JOYSTICK
dep_tristate ' SpaceTec SpaceBall 4000 FLX 6dof controller' CONFIG_INPUT_SPACEBALL $CONFIG_JOYSTICK
dep_tristate ' I-Force joysticks/wheels' CONFIG_INPUT_IFORCE_232 $CONFIG_JOYSTICK
- if [ "$CONFIG_INPUT_IFORCE_232" != "n" ]; then
- define_tristate CONFIG_INPUT_IFORCE $CONFIG_INPUT_IFORCE_232
- fi
if [ "$CONFIG_PARPORT" != "n" ]; then
comment 'Parallel port joysticks'
diff -urN linux-2.4.0-test7-pre5-moved/drivers/input/Makefile linux/drivers/input/Makefile
--- linux-2.4.0-test7-pre5-moved/drivers/input/Makefile Sun Aug 6 20:23:40 2000
+++ linux/drivers/input/Makefile Sat Aug 19 15:18:57 2000
@@ -1,5 +1,5 @@
#
-# Makefile for the joystick drivers.
+# Makefile for the input drivers.
#
# Subdirs.
@@ -11,13 +11,13 @@
# The target object and module list name.
-O_TARGET := js.o
+O_TARGET := inputdrv.o
M_OBJS :=
O_OBJS :=
# Objects that export symbols.
-export-objs := serio.o gameport.o
+export-objs := input.o serio.o gameport.o
# Object file lists.
@@ -26,6 +26,19 @@
obj-n :=
obj- :=
+# I-Force may need USB as well as RS232
+
+ifeq ($(CONFIG_INPUT_IFORCE_USB),y)
+ ifeq ($(CONFIG_INPUT_IFORCE_232),m)
+ CONFIG_INPUT_IFORCE_USB := m
+ endif
+endif
+ifeq ($(CONFIG_INPUT_IFORCE_232),y)
+ ifeq ($(CONFIG_INPUT_IFORCE_USB),m)
+ CONFIG_INPUT_IFORCE_232 := m
+ endif
+endif
+
# Each configuration option enables a list of files.
obj-$(CONFIG_INPUT_SERPORT) += serport.o serio.o
@@ -34,27 +47,40 @@
obj-$(CONFIG_INPUT_LIGHTNING) += lightning.o gameport.o
obj-$(CONFIG_INPUT_PCIGAME) += pcigame.o gameport.o
-obj-$(CONFIG_INPUT_WARRIOR) += warrior.o serio.o
-obj-$(CONFIG_INPUT_MAGELLAN) += magellan.o serio.o
-obj-$(CONFIG_INPUT_SPACEORB) += spaceorb.o serio.o
-obj-$(CONFIG_INPUT_SPACEBALL) += spaceball.o serio.o
-obj-$(CONFIG_INPUT_IFORCE_232) += serio.o
-
-obj-$(CONFIG_INPUT_ANALOG) += analog.o gameport.o
-obj-$(CONFIG_INPUT_A3D) += a3d.o gameport.o
-obj-$(CONFIG_INPUT_ADI) += adi.o gameport.o
-obj-$(CONFIG_INPUT_COBRA) += cobra.o gameport.o
-obj-$(CONFIG_INPUT_GF2K) += gf2k.o gameport.o
-obj-$(CONFIG_INPUT_GRIP) += grip.o gameport.o
-obj-$(CONFIG_INPUT_INTERACT) += interact.o gameport.o
-obj-$(CONFIG_INPUT_TMDC) += tmdc.o gameport.o
-obj-$(CONFIG_INPUT_SIDEWINDER) += sidewinder.o gameport.o
-
-obj-$(CONFIG_INPUT_DB9) += db9.o
-obj-$(CONFIG_INPUT_GAMECON) += gamecon.o
-obj-$(CONFIG_INPUT_TURBOGRAFX) += turbografx.o
+obj-$(CONFIG_INPUT_WARRIOR) += warrior.o serio.o input.o
+obj-$(CONFIG_INPUT_MAGELLAN) += magellan.o serio.o input.o
+obj-$(CONFIG_INPUT_SPACEORB) += spaceorb.o serio.o input.o
+obj-$(CONFIG_INPUT_SPACEBALL) += spaceball.o serio.o input.o
+obj-$(CONFIG_INPUT_IFORCE_232) += iforce.o serio.o input.o
+
+obj-$(CONFIG_INPUT_ANALOG) += analog.o gameport.o input.o
+obj-$(CONFIG_INPUT_A3D) += a3d.o gameport.o input.o
+obj-$(CONFIG_INPUT_ADI) += adi.o gameport.o input.o
+obj-$(CONFIG_INPUT_COBRA) += cobra.o gameport.o input.o
+obj-$(CONFIG_INPUT_GF2K) += gf2k.o gameport.o input.o
+obj-$(CONFIG_INPUT_GRIP) += grip.o gameport.o input.o
+obj-$(CONFIG_INPUT_INTERACT) += interact.o gameport.o input.o
+obj-$(CONFIG_INPUT_TMDC) += tmdc.o gameport.o input.o
+obj-$(CONFIG_INPUT_SIDEWINDER) += sidewinder.o gameport.o input.o
+
+obj-$(CONFIG_INPUT_DB9) += db9.o input.o
+obj-$(CONFIG_INPUT_GAMECON) += gamecon.o input.o
+obj-$(CONFIG_INPUT_TURBOGRAFX) += turbografx.o input.o
+
+obj-$(CONFIG_INPUT_AMIJOY) += amijoy.o input.o
+
+obj-$(CONFIG_USB_HID) += hid.o input.o
+obj-$(CONFIG_USB_MOUSE) += usbmouse.o input.o
+obj-$(CONFIG_USB_KBD) += usbkbd.o input.o
+obj-$(CONFIG_USB_WACOM) += wacom.o input.o
+obj-$(CONFIG_INPUT_IFORCE_USB) += iforce.o input.o
+
+obj-$(CONFIG_INPUT_KEYBDEV) += keybdev.o input.o
+obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o input.o
+obj-$(CONFIG_INPUT_JOYDEV) += joydev.o input.o
+obj-$(CONFIG_INPUT_EVDEV) += evdev.o input.o
-obj-$(CONFIG_INPUT_AMIJOY) += amijoy.o
+obj-$(CONFIG_JOYSTICK) += joydev.o input.o
# Files that are both resident and modular: remove from modular.
diff -urN linux-2.4.0-test7-pre5-moved/drivers/usb/Config.in linux/drivers/usb/Config.in
--- linux-2.4.0-test7-pre5-moved/drivers/usb/Config.in Thu Jul 20 01:23:35 2000
+++ linux/drivers/usb/Config.in Sat Aug 19 15:14:18 2000
@@ -6,6 +6,9 @@
tristate 'Support for USB' CONFIG_USB
if [ ! "$CONFIG_USB" = "n" ]; then
+
+ define_bool CONFIG_INPUT y
+
bool ' USB verbose debug messages' CONFIG_USB_DEBUG
comment 'Miscellaneous USB options'
@@ -82,10 +85,7 @@
fi
dep_tristate ' Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB
dep_tristate ' I-Force joysticks/wheels' CONFIG_INPUT_IFORCE_USB $CONFIG_USB
- if [ "$CONFIG_INPUT_IFORCE_USB" != "n" ]; then
- define_tristate CONFIG_INPUT_IFORCE $CONFIG_INPUT_IFORCE_USB
- fi
- dep_tristate ' Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_USB
+ dep_tristate ' Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_USB $CONFIG_VT
dep_tristate ' Mouse support' CONFIG_INPUT_MOUSEDEV $CONFIG_USB
if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
int ' Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
diff -urN linux-2.4.0-test7-pre5-moved/drivers/usb/Makefile linux/drivers/usb/Makefile
--- linux-2.4.0-test7-pre5-moved/drivers/usb/Makefile Sat Aug 19 09:04:26 2000
+++ linux/drivers/usb/Makefile Sat Aug 19 09:28:50 2000
@@ -19,10 +19,6 @@
export-objs := usb.o input.o
-# Objects which appear many times
-
-common-objs := input.o
-
# Multipart objects.
list-multi := usbcore.o
@@ -48,16 +44,6 @@
obj-$(CONFIG_USB_UHCI_ALT) += uhci.o
obj-$(CONFIG_USB_OHCI) += usb-ohci.o
-obj-$(CONFIG_USB_MOUSE) += usbmouse.o input.o
-obj-$(CONFIG_USB_HID) += hid.o input.o
-obj-$(CONFIG_USB_KBD) += usbkbd.o input.o
-obj-$(CONFIG_USB_WACOM) += wacom.o input.o
-obj-$(CONFIG_INPUT_IFORCE) += iforce.o input.o
-obj-$(CONFIG_INPUT_KEYBDEV) += keybdev.o input.o
-obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o input.o
-obj-$(CONFIG_INPUT_JOYDEV) += joydev.o input.o
-obj-$(CONFIG_INPUT_EVDEV) += evdev.o input.o
-
obj-$(CONFIG_USB_SCANNER) += scanner.o
obj-$(CONFIG_USB_ACM) += acm.o
obj-$(CONFIG_USB_PRINTER) += printer.o
@@ -94,13 +80,6 @@
MOD_IN_SUB_DIRS += storage
endif
endif
-
-# Remove duplicates.
-# The 'common-*' lists are intermediate lists used to filter out
-# duplicates.
-
-common-y := $(filter $(obj-y),$(common-obj))
-obj-y := $(filter-out $(common-y), $(obj-y)) $(common-y)
# Extract lists of the multi-part drivers.
# The 'int-*' lists are the intermediate files used to build the multi's.
--- linux-2.4.0-test7-pre5-moved/drivers/input/iforce.c Fri Jul 28 03:36:54 2000
+++ linux/drivers/input/iforce.c Sat Aug 19 23:18:50 2000
@@ -107,6 +107,7 @@
}
}
+#ifdef IFORCE_USB
static int iforce_open(struct input_dev *dev)
{
@@ -127,6 +128,8 @@
usb_unlink_urb(&iforce->irq);
}
+#endif
+
static void iforce_input_setup(struct iforce *iforce)
{
int i;
@@ -156,8 +159,11 @@
}
iforce->dev.private = iforce;
+
+#ifdef IFORCE_USB
iforce->dev.open = iforce_open;
iforce->dev.close = iforce_close;
+#endif
input_register_device(&iforce->dev);
}
References:
- Updated Linux 2.4 issues page"Theodore Ts'o" <tytso _at_ mit.edu>
- Re: Updated Linux 2.4 issues pageFranz Sirl <Franz.Sirl-kernel _at_ lauterbach.com>
- Prev by Date: 2.4.0-test6 and modules.dep
- Next by Date: [patch] deadlock over timerlist_lock
- Prev by thread: Re: Updated Linux 2.4 issues page
- Next by thread: Re: Updated Linux 2.4 issues page
- Indexes:[Main][Thread]