bustypes wrong in probing/probe-input.c
Bastien Nocera
hadess at hadess.net
Wed Jun 21 06:31:29 PDT 2006
On Tue, 2006-06-20 at 17:36 +0200, Johannes Berg wrote:
> My version (slightly older) of probe-input.c contains:
>
> switch (id.bustype) {
> case 17: /* TODO: x86 legacy port; use symbol instead of hardcoded constant */
> case 21: /* BUS_HOST, not hotpluggable */
> case 23: /* ADB on Apple computers */
> break;
> default:
> goto out;
> }
>
> So far, so good. I had BUS_HOST for my new PMU event patch that is going
> to be in the kernel... Now, it doesn't work and I started pulling my
> hair out until I realised that the comment above is bogus.
>
> linux-2.6/include/linux/input.h:
> #define BUS_HOST 0x19
>
> which obviously doesn't equal 21 but 25.
Stupid question, but why not use the hex directly in the switch cases?
Surely, this would avoid the sort of problem you've seen.
--
Bastien Nocera <hadess at hadess.net>
More information about the hal
mailing list