Commit 1433db3d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Vojtech Pavlik

[PATCH] USB: add usb_get_serial_data() and usb_set_serial_data() functions.

This is to access the private pointer in struct usb_serial
parent 3e52f135
......@@ -148,7 +148,8 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void
* @port: array of struct usb_serial_port structures for the different ports.
* @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.
* will not touch this. Use usb_get_serial_data() and
* usb_set_serial_data() to access this.
*/
struct usb_serial {
int magic;
......@@ -166,9 +167,18 @@ struct usb_serial {
void * private;
};
#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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment