Commit 4c21480a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Vojtech Pavlik

[PATCH] USB: take out private pointer from struct usb_serial_port

The struct device pointer should be used instead.
parent da73843f
......@@ -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,11 +117,21 @@ struct usb_serial_port {
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
* @magic: magic number for internal validity of this pointer.
......
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