Re: Unresolved symbols in joystick modules in test4

From: Cesar Eduardo Barros (cesarb@nitnet.com.br)
Date: Mon Jul 17 2000 - 13:08:34 EST


On Mon, Jul 17, 2000 at 09:58:22AM -0700, Dunlap, Randy wrote:
> > In the transition from test4-pre6 to test4, the code that
> > forced CONFIG_USB to
> > be defined when joystick was being compiled was removed. This
> > seems to break
> > the joystick modules when one is not using USB (depmod finds
> > lots of unresolved symbols).
>
> The one-liner in drivers/char/joystick/Config.in
> that previously did set CONFIG_USB did so incorrectly in some cases
> and mussed up USB subsystem configurations.
>
> Correct patches would be welcome. Reverting to the way
> that it was is not welcome IMO.

I'm too lazy to code a patch right now, but I have some ideas.

The variables should be set in the usb Config.in, not in the joystick one.

In the end of the Config.in for usb:

1. If CONFIG_USB not set, set it to CONFIG_JOYSTICK
2. If CONFIG_USB is set to m and CONFIG_JOYSTICK is set, set it to
   CONFIG_JOYSTICK
3. If CONFIG_USB is set to y, do nothing.

The same should be done to CONFIG_INPUT_JOYDEV.

This is wrong anyways IMHO; it would work, but is messy and does not show the
dependencies. The RIGHT answer, which would work in all situations without the
need for hackish kludges like the one above, would be to make CONFIG_JOYSTICK
depend on CONFIG_INPUT_JOYDEV. (Think about it; if the joystick code needs USB
_that_ badly, it means it _depends_ on it, and hiding it in such a confusing
way (CONFIG_USB getting automagically set after menuconfig exits by some random
code outside drivers/usb) is evil and rude.)

This should be documented somewhere in Documentation/... "Don't mess with
config variables you don't own."

-- 
Cesar Eduardo Barros
cesarb@nitnet.com.br
cesarb@dcc.ufrj.br

- 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/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:09 EST