Re: [PARPORT] Parport numbering

Philip Blundell (
Sun, 22 Feb 1998 15:28:13 +0000

>When parport_unregister_port is called for the very last allocated parport
>number, that parport number should be available for re-use.

That sounds like a good plan. But you can't guarantee the order that ports
will get unregistered in (they might belong to different drivers). I think
you need to keep track of the number of the highest port independently of

Incidentally, if there's anywhere else that this sort of gruesome thing happens:

        char lastname[16];
        sprintf (lastname, "parport%d", portcount - 1);
        if (!strcmp (port->name, lastname)) portcount--;

then we ought to keep the port number as an integer in struct parport as well
as (or even instead of) the string version.


-- To unsubscribe, send mail to: --
-- with the single word "unsubscribe" in the body of the message. --

This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:29 EST