ChangeSet 1.946.3.14, 2002/12/26 17:38:28-08:00, [EMAIL PROTECTED]
[PATCH] USB: take out private pointer from struct usb_serial_port
The struct device pointer should be used instead.
diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
--- a/drivers/usb/serial/usb-serial.h Fri Dec 27 23:57:17 2002
+++ b/drivers/usb/serial/usb-serial.h Fri Dec 27 23:57:17 2002
@@ -90,9 +90,6 @@
* @work: work queue entry for the line discipline waking up.
* @open_count: number of times this port has been opened.
* @sem: struct semaphore used to lock this structure.
- * @private: place to put any driver specific information that is needed. The
- * usb-serial driver is required to manage this data, the usb-serial core
- * will not touch this.
*
* This structure is used by the usb-serial core and drivers for the specific
* ports of a device.
@@ -120,10 +117,20 @@
struct work_struct work;
int open_count;
struct semaphore sem;
- void * private;
struct device dev;
};
#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
+
+/* get and set the port private data pointer helper functions */
+static inline void *usb_get_serial_port_data (struct usb_serial_port *port)
+{
+ return dev_get_drvdata(&port->dev);
+}
+
+static inline void usb_set_serial_port_data (struct usb_serial_port *port, void *data)
+{
+ dev_set_drvdata(&port->dev, data);
+}
/**
* usb_serial - structure used by the usb-serial core for a device
-------------------------------------------------------
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