patch-2.4.0-test4 linux/include/linux/parport.h
Next file: linux/include/linux/pci_ids.h
Previous file: linux/include/linux/mtd/doc2000.h
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Wed Jul 12 16:24:34 2000
- Orig file:
v2.4.0-test3/linux/include/linux/parport.h
- Orig date:
Mon Jul 10 16:47:27 2000
diff -u --recursive --new-file v2.4.0-test3/linux/include/linux/parport.h linux/include/linux/parport.h
@@ -309,6 +309,7 @@
rwlock_t cad_lock;
int spintime;
+ atomic_t ref_count;
};
#define DEFAULT_SPIN_TIME 500 /* us */
@@ -337,12 +338,9 @@
/* Unregister a port. */
extern void parport_unregister_port(struct parport *port);
-/* parport_in_use returns nonzero if there are devices attached to a
- port. */
-#define parport_in_use(x) ((x)->devices != NULL)
-
/* parport_enumerate returns a pointer to the linked list of all the
- ports in this machine. */
+ ports in this machine. DON'T USE THIS. Use
+ parport_register_driver instead. */
struct parport *parport_enumerate(void);
/* Register a new high-level driver. */
@@ -350,6 +348,15 @@
/* Unregister a high-level driver. */
extern void parport_unregister_driver (struct parport_driver *);
+
+/* If parport_register_driver doesn't fit your needs, perhaps
+ * parport_find_xxx does. */
+extern struct parport *parport_find_number (int);
+extern struct parport *parport_find_base (unsigned long);
+
+/* Reference counting for ports. */
+extern struct parport *parport_get_port (struct parport *);
+extern void parport_put_port (struct parport *);
/* parport_register_device declares that a device is connected to a
port, and tells the kernel all it needs to know.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)