patch-2.4.23 linux-2.4.23/drivers/usb/serial/usb-serial.h
Next file: linux-2.4.23/drivers/usb/serial/usbserial.c
Previous file: linux-2.4.23/drivers/usb/serial/pl2303.h
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
2003-11-28 10:26:20.000000000 -0800
- Orig file:
linux-2.4.22/drivers/usb/serial/usb-serial.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.22/drivers/usb/serial/usb-serial.h linux-2.4.23/drivers/usb/serial/usb-serial.h
@@ -1,7 +1,7 @@
/*
* USB Serial Converter driver
*
- * Copyright (C) 1999 - 2002
+ * Copyright (C) 1999 - 2003
* Greg Kroah-Hartman (greg@kroah.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -67,7 +67,7 @@
* usb_serial_port: structure for the specific ports of a device.
* @magic: magic number for internal validity of this pointer.
* @serial: pointer back to the struct usb_serial owner of this port.
- * @tty: pointer to the coresponding tty for this port.
+ * @tty: pointer to the corresponding tty for this port.
* @number: the number of the port (the minor number).
* @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
* @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
@@ -118,6 +118,16 @@
struct semaphore sem;
void * private;
};
+/* get and set the port private data pointer helper functions */
+static inline void *usb_get_serial_port_data (struct usb_serial_port *port)
+{
+ return port->private;
+}
+
+static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data)
+{
+ port->private = data;
+}
/**
* usb_serial - structure used by the usb-serial core for a device
@@ -156,6 +166,16 @@
#define NUM_DONT_CARE (-1)
+/* get and set the serial private data pointer helper functions */
+static inline void *usb_get_serial_data (struct usb_serial *serial)
+{
+ return serial->private;
+}
+
+static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
+{
+ serial->private = data;
+}
/**
* usb_serial_device_type - a structure that defines a usb serial device
@@ -292,7 +312,7 @@
if (!port ||
port_paranoia_check (port, function) ||
serial_paranoia_check (port->serial, function)) {
- /* then say that we dont have a valid usb_serial thing, which will
+ /* then say that we don't have a valid usb_serial thing, which will
* end up genrating -ENODEV return values */
return NULL;
}
@@ -318,7 +338,7 @@
/* Use our own dbg macro */
#undef dbg
-#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg); } while (0)
+#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)