diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2013-07-30 23:43:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-31 17:51:43 -0700 |
commit | 51a19621ccb10191915220de8d2ec69bcb9862ac (patch) | |
tree | 9c31e16983bf87a22b7c1564e479be9c2d8c7c02 | |
parent | 03f9adf44cef7423fa9493b3abc2f2d764157481 (diff) |
staging: octeon-usb: cvmx_usb_port_status_t -> struct cvmx_usb_port_status
Replace cvmx_usb_port_status_t with struct cvmx_usb_port_status.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/octeon-usb/cvmx-usb.c | 10 | ||||
-rw-r--r-- | drivers/staging/octeon-usb/cvmx-usb.h | 37 | ||||
-rw-r--r-- | drivers/staging/octeon-usb/octeon-hcd.c | 4 |
3 files changed, 31 insertions, 20 deletions
diff --git a/drivers/staging/octeon-usb/cvmx-usb.c b/drivers/staging/octeon-usb/cvmx-usb.c index f5918979abd1..c92b15f30fea 100644 --- a/drivers/staging/octeon-usb/cvmx-usb.c +++ b/drivers/staging/octeon-usb/cvmx-usb.c @@ -196,7 +196,7 @@ typedef struct { cvmx_usb_callback_func_t callback[__CVMX_USB_CALLBACK_END]; /**< User global callbacks */ void *callback_data[__CVMX_USB_CALLBACK_END]; /**< User data for each callback */ int indent; /**< Used by debug output to indent functions */ - cvmx_usb_port_status_t port_status; /**< Last port status used for change notification */ + struct cvmx_usb_port_status port_status; /**< Last port status used for change notification */ cvmx_usb_pipe_list_t free_pipes; /**< List of all pipes that are currently closed */ cvmx_usb_pipe_list_t idle_pipes; /**< List of open pipes that have no transactions */ cvmx_usb_pipe_list_t active_pipes[4]; /**< Active pipes indexed by transfer type */ @@ -971,10 +971,10 @@ int cvmx_usb_disable(cvmx_usb_state_t *state) * * Returns: Port status information */ -cvmx_usb_port_status_t cvmx_usb_get_status(cvmx_usb_state_t *state) +struct cvmx_usb_port_status cvmx_usb_get_status(cvmx_usb_state_t *state) { cvmx_usbcx_hprt_t usbc_hprt; - cvmx_usb_port_status_t result; + struct cvmx_usb_port_status result; cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; memset(&result, 0, sizeof(result)); @@ -1003,7 +1003,7 @@ cvmx_usb_port_status_t cvmx_usb_get_status(cvmx_usb_state_t *state) * @port_status: * Port status to set, most like returned by cvmx_usb_get_status() */ -void cvmx_usb_set_status(cvmx_usb_state_t *state, cvmx_usb_port_status_t port_status) +void cvmx_usb_set_status(cvmx_usb_state_t *state, struct cvmx_usb_port_status port_status) { cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t *)state; usb->port_status = port_status; @@ -2964,7 +2964,7 @@ static int __cvmx_usb_poll_channel(cvmx_usb_internal_state_t *usb, int channel) pipe->next_tx_frame = usb->frame_number + pipe->interval - (usb->frame_number - pipe->next_tx_frame) % pipe->interval; } else { - cvmx_usb_port_status_t port; + struct cvmx_usb_port_status port; port = cvmx_usb_get_status((cvmx_usb_state_t *)usb); if (port.port_enabled) { /* We'll retry the exact same transaction again */ diff --git a/drivers/staging/octeon-usb/cvmx-usb.h b/drivers/staging/octeon-usb/cvmx-usb.h index cf49b13a806b..9c7ff4a6c52e 100644 --- a/drivers/staging/octeon-usb/cvmx-usb.h +++ b/drivers/staging/octeon-usb/cvmx-usb.h @@ -310,18 +310,29 @@ enum cvmx_usb_complete { }; /** - * Structure returned containing the USB port status information. + * struct cvmx_usb_port_status - the USB port status information + * + * @port_enabled: 1 = Usb port is enabled, 0 = disabled + * @port_over_current: 1 = Over current detected, 0 = Over current not + * detected. Octeon doesn't support over current detection. + * @port_powered: 1 = Port power is being supplied to the device, 0 = + * power is off. Octeon doesn't support turning port power + * off. + * @port_speed: Current port speed. + * @connected: 1 = A device is connected to the port, 0 = No device is + * connected. + * @connect_change: 1 = Device connected state changed since the last set + * status call. */ -typedef struct -{ - uint32_t reserved : 25; - uint32_t port_enabled : 1; /**< 1 = Usb port is enabled, 0 = disabled */ - uint32_t port_over_current : 1; /**< 1 = Over current detected, 0 = Over current not detected. Octeon doesn't support over current detection */ - uint32_t port_powered : 1; /**< 1 = Port power is being supplied to the device, 0 = power is off. Octeon doesn't support turning port power off */ - enum cvmx_usb_speed port_speed : 2; /**< Current port speed */ - uint32_t connected : 1; /**< 1 = A device is connected to the port, 0 = No device is connected */ - uint32_t connect_change : 1; /**< 1 = Device connected state changed since the last set status call */ -} cvmx_usb_port_status_t; +struct cvmx_usb_port_status { + uint32_t reserved : 25; + uint32_t port_enabled : 1; + uint32_t port_over_current : 1; + uint32_t port_powered : 1; + enum cvmx_usb_speed port_speed : 2; + uint32_t connected : 1; + uint32_t connect_change : 1; +}; /** * This is the structure of a Control packet header @@ -463,8 +474,8 @@ extern int cvmx_usb_initialize(cvmx_usb_state_t *state, int usb_port_number, extern int cvmx_usb_shutdown(cvmx_usb_state_t *state); extern int cvmx_usb_enable(cvmx_usb_state_t *state); extern int cvmx_usb_disable(cvmx_usb_state_t *state); -extern cvmx_usb_port_status_t cvmx_usb_get_status(cvmx_usb_state_t *state); -extern void cvmx_usb_set_status(cvmx_usb_state_t *state, cvmx_usb_port_status_t port_status); +extern struct cvmx_usb_port_status cvmx_usb_get_status(cvmx_usb_state_t *state); +extern void cvmx_usb_set_status(cvmx_usb_state_t *state, struct cvmx_usb_port_status port_status); extern int cvmx_usb_open_pipe(cvmx_usb_state_t *state, enum cvmx_usb_pipe_flags flags, int device_addr, int endpoint_num, diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 5137da74c2b2..8a41d092b08b 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -440,7 +440,7 @@ static void octeon_usb_endpoint_disable(struct usb_hcd *hcd, struct usb_host_end static int octeon_usb_hub_status_data(struct usb_hcd *hcd, char *buf) { struct octeon_hcd *priv = hcd_to_octeon(hcd); - cvmx_usb_port_status_t port_status; + struct cvmx_usb_port_status port_status; unsigned long flags; spin_lock_irqsave(&priv->lock, flags); @@ -456,7 +456,7 @@ static int octeon_usb_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, { struct octeon_hcd *priv = hcd_to_octeon(hcd); struct device *dev = hcd->self.controller; - cvmx_usb_port_status_t usb_port_status; + struct cvmx_usb_port_status usb_port_status; int port_status; struct usb_hub_descriptor *desc; unsigned long flags; |