Tim Waugh (tim@cyberelk.demon.co.uk)
Sun, 22 Feb 1998 17:18:52 +0000 (GMT)
On Sun, 22 Feb 1998, Philip Blundell wrote:
> Incidentally, if there's anywhere else that this sort of gruesome thing
> happens:
It's been nagging me, because I've been thinking "I've seen it before
_somewhere_" - now I've remembered.
It would be handy for ppuser if struct parport contained a parport number,
because at the moment it's doing a search in a similar way (using
simple_strtoul).
Here's a tiny, untested patch against 980221.
Tim.
*/
diff -durN linux-2.1.88+4/drivers/misc/parport_share.c linux/drivers/misc/parport_share.c
--- linux-2.1.88+4/drivers/misc/parport_share.c Tue Jan 27 08:50:52 1998
+++ linux/drivers/misc/parport_share.c Sun Feb 22 17:02:10 1998
@@ -90,6 +90,7 @@
tmp->devices = tmp->cad = NULL;
tmp->flags = 0;
tmp->ops = ops;
+ tmp->number = portcount;
spin_lock_init (&tmp->lock);
tmp->name = kmalloc(15, GFP_KERNEL);
diff -durN linux-2.1.88+4/include/linux/parport.h linux/include/linux/parport.h
--- linux-2.1.88+4/include/linux/parport.h Sun Feb 22 17:06:23 1998
+++ linux/include/linux/parport.h Sun Feb 22 17:01:50 1998
@@ -196,7 +196,7 @@
struct parport_operations *ops;
void *private_data; /* for lowlevel driver */
-
+ int number; /* port index - the `n' in `parportn' */
spinlock_t lock;
};
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- 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