Re: Elo touch panel

From: Vojtech Pavlik
Date: Wed Feb 08 2006 - 03:49:34 EST


On Tue, Feb 07, 2006 at 04:41:16PM -0700, Shaun Jackman wrote:

> There's a bug in inputattach. The SERIO_RS232 constant is completely
> mucking the bits that specify the protocol.
>
> --- inputattach.c- 2006-02-07 14:37:04.000000000 -0700
> +++ inputattach.c 2006-02-07 16:22:07.000000000 -0700
> @@ -455,7 +455,7 @@
> return 1;
> }
>
> - devt = SERIO_RS232 | input_types[type].type | (id << 8) | (extra << 16);
> + devt = input_types[type].type | (id << 8) | (extra << 16);
>
> if(ioctl(fd, SPIOCSTYPE, &devt)) {
> fprintf(stderr, "inputattach: can't set device type\n");
>
> Cheers,
> Shaun
>
> APPENDIX A
>
> You probably know this better than I do, but the .type above is
> misnamed. It should really be .proto. It's impossible, as far as I can
> tell, to specify the type (like SERIO_RS232) with a SPIOCSTYPE call.

It's an incompatibility in a later rework of serio.h/serport.c.
SERIO_RS232 used to be 0x02000000, now the constant isn't shifted up
anymore, which messed up things. Also, the type used to be possible to
set, but I don't think that needs to be fixed, since there are so far no
ttys that'd need a different serio type.

I'll apply your fix to inpuatttach. Thanks for spotting the bug.

--
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/