ChangeSet 1.1119.3.2, 2003/09/03 11:56:08-07:00, [EMAIL PROTECTED]
[PATCH] USB: update usb-serial.h with spelling fixes and get and set functions
Based off of the current 2.6 version, makes keeping the usb-serial drivers
more in sync between the two trees.
drivers/usb/serial/usb-serial.h | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
--- a/drivers/usb/serial/usb-serial.h Fri Sep 5 17:10:58 2003
+++ b/drivers/usb/serial/usb-serial.h Fri Sep 5 17:10:58 2003
@@ -1,7 +1,7 @@
/*
* USB Serial Converter driver
*
- * Copyright (C) 1999 - 2002
+ * Copyright (C) 1999 - 2003
* Greg Kroah-Hartman ([EMAIL PROTECTED])
*
* 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)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel