Commit 721e70a9 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

removed 'typedef' from the Keyspan usb-serial drivers.

parent 66e07223
......@@ -107,7 +107,7 @@ struct keyspan_serial_private {
/* number of active ports */
atomic_t active_count;
const keyspan_device_details *device_details;
const struct keyspan_device_details *device_details;
struct urb *instat_urb;
char instat_buf[INSTAT_BUFLEN];
......@@ -125,7 +125,7 @@ struct keyspan_port_private {
/* Keep duplicate of device details in each port
structure as well - simplifies some of the
callback functions etc. */
const keyspan_device_details *device_details;
const struct keyspan_device_details *device_details;
/* Input endpoints and buffer for this port */
struct urb *in_urbs[2];
......@@ -243,7 +243,7 @@ static void keyspan_set_termios (struct usb_serial_port *port,
{
int baud_rate;
struct keyspan_port_private *p_priv;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
unsigned int cflag;
dbg(__FUNCTION__ ".\n");
......@@ -321,7 +321,7 @@ static int keyspan_write(struct usb_serial_port *port, int from_user,
const unsigned char *buf, int count)
{
struct keyspan_port_private *p_priv;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
int flip;
int left, todo;
struct urb *this_urb;
......@@ -481,7 +481,7 @@ static void usa26_outcont_callback(struct urb *urb)
static void usa26_instat_callback(struct urb *urb)
{
unsigned char *data = urb->transfer_buffer;
keyspan_usa26_portStatusMessage *msg;
struct keyspan_usa26_portStatusMessage *msg;
struct usb_serial *serial;
struct usb_serial_port *port;
struct keyspan_port_private *p_priv;
......@@ -498,7 +498,7 @@ static void usa26_instat_callback(struct urb *urb)
goto exit;
}
msg = (keyspan_usa26_portStatusMessage *)data;
msg = (struct keyspan_usa26_portStatusMessage *)data;
#if 0
dbg(__FUNCTION__ " port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d\n",
......@@ -619,7 +619,7 @@ static void usa28_instat_callback(struct urb *urb)
{
int err;
unsigned char *data = urb->transfer_buffer;
keyspan_usa28_portStatusMessage *msg;
struct keyspan_usa28_portStatusMessage *msg;
struct usb_serial *serial;
struct usb_serial_port *port;
struct keyspan_port_private *p_priv;
......@@ -642,7 +642,7 @@ static void usa28_instat_callback(struct urb *urb)
data[6], data[7], data[8], data[9], data[10], data[11]);*/
/* Now do something useful with the data */
msg = (keyspan_usa28_portStatusMessage *)data;
msg = (struct keyspan_usa28_portStatusMessage *)data;
/* Check port number from message and retrieve private data */
......@@ -710,7 +710,7 @@ static void usa49_instat_callback(struct urb *urb)
{
int err;
unsigned char *data = urb->transfer_buffer;
keyspan_usa49_portStatusMessage *msg;
struct keyspan_usa49_portStatusMessage *msg;
struct usb_serial *serial;
struct usb_serial_port *port;
struct keyspan_port_private *p_priv;
......@@ -735,7 +735,7 @@ static void usa49_instat_callback(struct urb *urb)
data[6], data[7], data[8], data[9], data[10]);*/
/* Now do something useful with the data */
msg = (keyspan_usa49_portStatusMessage *)data;
msg = (struct keyspan_usa49_portStatusMessage *)data;
/* Check port number from message and retrieve private data */
if (msg->portNumber >= serial->num_ports) {
......@@ -851,7 +851,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
struct keyspan_port_private *p_priv;
struct keyspan_serial_private *s_priv;
struct usb_serial *serial = port->serial;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
int i, already_active, err;
struct urb *urb;
......@@ -1106,7 +1106,7 @@ static void keyspan_setup_urbs(struct usb_serial *serial)
{
int i, j;
struct keyspan_serial_private *s_priv;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
struct usb_serial_port *port;
struct keyspan_port_private *p_priv;
struct callbacks *cback;
......@@ -1293,7 +1293,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
struct keyspan_usa26_portControlMessage msg;
struct keyspan_serial_private *s_priv;
struct keyspan_port_private *p_priv;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
int outcont_urb;
struct urb *this_urb;
int err;
......@@ -1429,7 +1429,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
struct keyspan_usa28_portControlMessage msg;
struct keyspan_serial_private *s_priv;
struct keyspan_port_private *p_priv;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
struct urb *this_urb;
int err;
......@@ -1514,7 +1514,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
struct keyspan_usa49_portControlMessage msg;
struct keyspan_serial_private *s_priv;
struct keyspan_port_private *p_priv;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
int glocont_urb;
struct urb *this_urb;
int err;
......@@ -1640,7 +1640,7 @@ static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
{
struct usb_serial *serial = port->serial;
struct keyspan_serial_private *s_priv;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
s_priv = (struct keyspan_serial_private *)(serial->private);
d_details = s_priv->device_details;
......@@ -1666,7 +1666,7 @@ static int keyspan_startup (struct usb_serial *serial)
struct usb_serial_port *port;
struct keyspan_serial_private *s_priv;
struct keyspan_port_private *p_priv;
const keyspan_device_details *d_details;
const struct keyspan_device_details *d_details;
dbg("keyspan_startup called.\n");
......
......@@ -194,7 +194,7 @@ struct ezusb_hex_record {
#define keyspan_usa49w_product_id 0x010a
typedef struct {
struct keyspan_device_details {
/* product ID value */
int product_id;
......@@ -232,13 +232,13 @@ typedef struct {
u8 *rate_hi, u8 *rate_low, u8 *prescaler);
u32 baudclk;
} keyspan_device_details;
};
/* Now for each device type we setup the device detail
structure with the appropriate information (provided
in Keyspan's documentation) */
static const keyspan_device_details usa18x_device_details = {
static const struct keyspan_device_details usa18x_device_details = {
keyspan_usa18x_product_id, /* product ID */
msg_usa26, /* msg type*/
1, /* num ports */
......@@ -254,7 +254,7 @@ static const keyspan_device_details usa18x_device_details = {
KEYSPAN_USA18X_BAUDCLK /* base baud clock */
};
static const keyspan_device_details usa19_device_details = {
static const struct keyspan_device_details usa19_device_details = {
keyspan_usa19_product_id, /* product ID */
msg_usa28, /* msg type*/
1, /* num ports */
......@@ -270,7 +270,7 @@ static const keyspan_device_details usa19_device_details = {
KEYSPAN_USA19_BAUDCLK /* base baud clock */
};
static const keyspan_device_details usa19w_device_details = {
static const struct keyspan_device_details usa19w_device_details = {
keyspan_usa19w_product_id, /* product ID */
msg_usa26, /* msg type*/
1, /* num ports */
......@@ -286,7 +286,7 @@ static const keyspan_device_details usa19w_device_details = {
KEYSPAN_USA19W_BAUDCLK /* base baud clock */
};
static const keyspan_device_details usa28x_device_details = {
static const struct keyspan_device_details usa28x_device_details = {
keyspan_usa28x_product_id, /* product ID */
msg_usa26, /* msg type*/
2, /* num ports */
......@@ -302,7 +302,7 @@ static const keyspan_device_details usa28x_device_details = {
KEYSPAN_USA28X_BAUDCLK
};
static const keyspan_device_details usa28xa_device_details = {
static const struct keyspan_device_details usa28xa_device_details = {
keyspan_usa28xa_product_id, /* product ID */
msg_usa26, /* msg type*/
2, /* num ports */
......@@ -320,7 +320,7 @@ static const keyspan_device_details usa28xa_device_details = {
/* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
static const keyspan_device_details usa49w_device_details = {
static const struct keyspan_device_details usa49w_device_details = {
keyspan_usa49w_product_id, /* product ID */
msg_usa49, /* msg type*/
4, /* num ports */
......@@ -336,7 +336,7 @@ static const keyspan_device_details usa49w_device_details = {
KEYSPAN_USA49W_BAUDCLK
};
static const keyspan_device_details *keyspan_devices[] = {
static const struct keyspan_device_details *keyspan_devices[] = {
&usa18x_device_details,
&usa19_device_details,
&usa19w_device_details,
......
......@@ -93,7 +93,7 @@
#define __USA26MSG__
typedef struct keyspan_usa26_portControlMessage
struct keyspan_usa26_portControlMessage
{
/*
there are three types of "commands" sent in the control message:
......@@ -164,7 +164,7 @@ typedef struct keyspan_usa26_portControlMessage
returnStatus, // BOTH: return current status (even if it hasn't changed)
resetDataToggle;// BOTH: reset data toggle state to DATA0
} keyspan_usa26_portControlMessage;
};
// defines for bits in lcr
#define USA_DATABITS_5 0x00
......@@ -182,7 +182,7 @@ typedef struct keyspan_usa26_portControlMessage
// all things called "StatusMessage" are sent on the status endpoint
typedef struct keyspan_usa26_portStatusMessage // one for each port
struct keyspan_usa26_portStatusMessage // one for each port
{
u8 port, // BOTH: 0=first, 1=second, other=see below
hskia_cts, // USA26: reports HSKIA pin
......@@ -195,7 +195,7 @@ typedef struct keyspan_usa26_portStatusMessage // one for each port
_txXoff, // port is in XOFF state (either host or RX XOFF)
rxEnabled, // as configured by rxOn/rxOff 1=on, 0=off
controlResponse;// 1=a control message has been processed
} keyspan_usa26_portStatusMessage;
};
// bits in RX data message when STAT byte is included
#define RXERROR_OVERRUN 0x02
......@@ -203,28 +203,28 @@ typedef struct keyspan_usa26_portStatusMessage // one for each port
#define RXERROR_FRAMING 0x08
#define RXERROR_BREAK 0x10
typedef struct keyspan_usa26_globalControlMessage
struct keyspan_usa26_globalControlMessage
{
u8 sendGlobalStatus, // 2=request for two status responses
resetStatusToggle, // 1=reset global status toggle
resetStatusCount; // a cycling value
} keyspan_usa26_globalControlMessage;
};
typedef struct keyspan_usa26_globalStatusMessage
struct keyspan_usa26_globalStatusMessage
{
u8 port, // 3
sendGlobalStatus, // from request, decremented
resetStatusCount; // as in request
} keyspan_usa26_globalStatusMessage;
};
typedef struct keyspan_usa26_globalDebugMessage
struct keyspan_usa26_globalDebugMessage
{
u8 port, // 2
a,
b,
c,
d;
} keyspan_usa26_globalDebugMessage;
};
// ie: the maximum length of an EZUSB endpoint buffer
#define MAX_DATA_LEN 64
......
......@@ -95,7 +95,7 @@
#define __USA28MSG__
typedef struct keyspan_usa28_portControlMessage
struct keyspan_usa28_portControlMessage
{
/*
there are four types of "commands" sent in the control message:
......@@ -146,9 +146,9 @@ typedef struct keyspan_usa28_portControlMessage
returnStatus, // return current status n times (1 or 2)
resetDataToggle;// reset data toggle state to DATA0
} keyspan_usa28_portControlMessage;
};
typedef struct keyspan_usa28_portStatusMessage
struct keyspan_usa28_portStatusMessage
{
u8 port, // 0=first, 1=second, 2=global (see below)
cts,
......@@ -164,32 +164,32 @@ typedef struct keyspan_usa28_portStatusMessage
rxBreak, // 1=we're in break state
rs232invalid, // 1=no valid signals on rs-232 inputs
controlResponse;// 1=a control messages has been processed
} keyspan_usa28_portStatusMessage;
};
// bit defines in txState
#define TX_OFF 0x01 // requested by host txOff command
#define TX_XOFF 0x02 // either real, or simulated by host
typedef struct keyspan_usa28_globalControlMessage
struct keyspan_usa28_globalControlMessage
{
u8 sendGlobalStatus, // 2=request for two status responses
resetStatusToggle, // 1=reset global status toggle
resetStatusCount; // a cycling value
} keyspan_usa28_globalControlMessage;
};
typedef struct keyspan_usa28_globalStatusMessage
struct keyspan_usa28_globalStatusMessage
{
u8 port, // 3
sendGlobalStatus, // from request, decremented
resetStatusCount; // as in request
} keyspan_usa28_globalStatusMessage;
};
typedef struct keyspan_usa28_globalDebugMessage
struct keyspan_usa28_globalDebugMessage
{
u8 port, // 2
n, // typically a count/status byte
b; // typically a data byte
} keyspan_usa28_globalDebugMessage;
};
// ie: the maximum length of an EZUSB endpoint buffer
#define MAX_DATA_LEN 64
......
......@@ -107,7 +107,7 @@
0x80 globalControlMessage
*/
typedef struct keyspan_usa49_portControlMessage
struct keyspan_usa49_portControlMessage
{
/*
0. 0/1/2/3 port control message follows
......@@ -173,7 +173,7 @@ typedef struct keyspan_usa49_portControlMessage
enablePort, // start servicing port (move data, check status)
disablePort; // stop servicing port (does implicit tx/rx flush/off)
} keyspan_usa49_portControlMessage;
};
// defines for bits in lcr
#define USA_DATABITS_5 0x00
......@@ -201,7 +201,7 @@ typedef struct keyspan_usa49_portControlMessage
sends any control message (either global or port-specific).
*/
typedef struct keyspan_usa49_globalControlMessage
struct keyspan_usa49_globalControlMessage
{
u8 portNumber, // 0x80
sendGlobalStatus, // 1/2=number of status responses requested
......@@ -209,7 +209,7 @@ typedef struct keyspan_usa49_globalControlMessage
resetStatusCount, // a cycling value
remoteWakeupEnable, // 0x10=P1, 0x20=P2, 0x40=P3, 0x80=P4
disableStatusMessages; // 1=send no status until host talks
} keyspan_usa49_globalControlMessage;
};
/*
Device->host messages send on the global status endpoint
......@@ -221,7 +221,7 @@ typedef struct keyspan_usa49_globalControlMessage
0x81 globalDebugMessage
*/
typedef struct keyspan_usa49_portStatusMessage // one for each port
struct keyspan_usa49_portStatusMessage // one for each port
{
u8 portNumber, // 0,1,2,3
cts, // reports CTS pin
......@@ -234,7 +234,7 @@ typedef struct keyspan_usa49_portStatusMessage // one for each port
controlResponse,// 1=a control message has been processed
txAck, // ACK (data TX complete)
rs232valid; // RS-232 signal valid
} keyspan_usa49_portStatusMessage;
};
// bits in RX data message when STAT byte is included
#define RXERROR_OVERRUN 0x02
......@@ -242,19 +242,19 @@ typedef struct keyspan_usa49_portStatusMessage // one for each port
#define RXERROR_FRAMING 0x08
#define RXERROR_BREAK 0x10
typedef struct keyspan_usa49_globalStatusMessage
struct keyspan_usa49_globalStatusMessage
{
u8 portNumber, // 0x80=globalStatusMessage
sendGlobalStatus, // from request, decremented
resetStatusCount; // as in request
} keyspan_usa49_globalStatusMessage;
};
typedef struct keyspan_usa49_globalDebugMessage
struct keyspan_usa49_globalDebugMessage
{
u8 portNumber, // 0x81=globalDebugMessage
n, // typically a count/status byte
b; // typically a data byte
} keyspan_usa49_globalDebugMessage;
};
// ie: the maximum length of an EZUSB endpoint buffer
#define MAX_DATA_LEN 64
......
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