summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Viro <viro@www.linux.org.uk>2004-02-04 16:58:34 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-02-04 16:58:34 -0800
commit8d19538bd5e7aa71ff8dac5fbd272bdc17ad6311 (patch)
tree3acd73a036fe2919235c98af4dd4ef190d9461a6 /include
parent99db82cf15d9f4d85c5d80417f74d3d33978fc6a (diff)
[PATCH] parport fixes (1/6)
Current tree has all allocated ports on portlist. However, most of the portlist users assume that we only have announced ports there and break badly if they happen to see the list after port driver has created a port (parport_register_port()) but before it finishes the setup (and calls parport_announce_port()). The only place that wants to see all allocated port is parport_register_port() itself and only to pick the first unused port number. We add a new list (all_ports) and put ports there when allocated; that list is kept ordered by port->number. Ports are placed on portlist only by parport_announce_port(). Gobs of shite in parport_register_port() removed, pile of races closed...
Diffstat (limited to 'include')
-rw-r--r--include/linux/parport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 77e99e8eace2..eff925bb5da6 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -311,6 +311,8 @@ struct parport {
int spintime;
atomic_t ref_count;
+
+ struct list_head full_list;
};
#define DEFAULT_SPIN_TIME 500 /* us */