staging: octeon-usb: cvmx_usb_speed_t -> enum cvmx_usb_speed
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 30 Jul 2013 20:42:53 +0000 (23:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Aug 2013 00:49:04 +0000 (17:49 -0700)
Replace cvmx_usb_speed_t with enum cvmx_usb_speed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon-usb/cvmx-usb.c
drivers/staging/octeon-usb/cvmx-usb.h
drivers/staging/octeon-usb/octeon-hcd.c

index fa029e3f8db13324b203da87240d02a93046c6b3..44f4db0cfd9ac128748c513027ec1ca9266bb2e4 100644 (file)
@@ -151,7 +151,7 @@ typedef struct cvmx_usb_pipe {
        uint64_t interval;                      /**< For periodic pipes, the interval between packets in frames */
        uint64_t next_tx_frame;                 /**< The next frame this pipe is allowed to transmit on */
        cvmx_usb_pipe_flags_t flags;            /**< State flags for this pipe */
-       cvmx_usb_speed_t device_speed;          /**< Speed of device connected to this pipe */
+       enum cvmx_usb_speed device_speed;       /**< Speed of device connected to this pipe */
        cvmx_usb_transfer_t transfer_type;      /**< Type of transaction supported by this pipe */
        cvmx_usb_direction_t transfer_dir;      /**< IN or OUT. Ignored for Control */
        int multi_count;                        /**< Max packet in a row for the device */
@@ -1103,7 +1103,7 @@ static inline int __cvmx_usb_get_pipe_handle(cvmx_usb_internal_state_t *usb,
  */
 int cvmx_usb_open_pipe(cvmx_usb_state_t *state, cvmx_usb_pipe_flags_t flags,
                       int device_addr, int endpoint_num,
-                      cvmx_usb_speed_t device_speed, int max_packet,
+                      enum cvmx_usb_speed device_speed, int max_packet,
                       cvmx_usb_transfer_t transfer_type,
                       cvmx_usb_direction_t transfer_dir, int interval,
                       int multi_count, int hub_device_addr, int hub_port)
index 4b425e5fa8ae5f42246b078cd93754da849f29f8..c5ccda34b530a897240cfdaa20968b9a81a26d89 100644 (file)
 #define __CVMX_USB_H__
 
 /**
- * Enumerations representing the possible USB device speeds
+ * enum cvmx_usb_speed - the possible USB device speeds
+ *
+ * @CVMX_USB_SPEED_HIGH: Device is operation at 480Mbps
+ * @CVMX_USB_SPEED_FULL: Device is operation at 12Mbps
+ * @CVMX_USB_SPEED_LOW:  Device is operation at 1.5Mbps
  */
-typedef enum
-{
-    CVMX_USB_SPEED_HIGH = 0,        /**< Device is operation at 480Mbps */
-    CVMX_USB_SPEED_FULL = 1,        /**< Device is operation at 12Mbps */
-    CVMX_USB_SPEED_LOW = 2,         /**< Device is operation at 1.5Mbps */
-} cvmx_usb_speed_t;
+enum cvmx_usb_speed {
+       CVMX_USB_SPEED_HIGH = 0,
+       CVMX_USB_SPEED_FULL = 1,
+       CVMX_USB_SPEED_LOW = 2,
+};
 
 /**
  * Enumeration representing the possible USB transfer types.
@@ -290,7 +293,7 @@ typedef struct
     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 */
-    cvmx_usb_speed_t port_speed : 2; /**< Current port speed */
+    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;
@@ -413,7 +416,7 @@ extern void cvmx_usb_set_status(cvmx_usb_state_t *state, cvmx_usb_port_status_t
 extern int cvmx_usb_open_pipe(cvmx_usb_state_t *state,
                               cvmx_usb_pipe_flags_t flags,
                               int device_addr, int endpoint_num,
-                              cvmx_usb_speed_t device_speed, int max_packet,
+                              enum cvmx_usb_speed device_speed, int max_packet,
                               cvmx_usb_transfer_t transfer_type,
                               cvmx_usb_direction_t transfer_dir, int interval,
                               int multi_count, int hub_device_addr,
index d156b603ae655800046487120ab0f2627c4baa12..f32d8fc60200e8503411b9279ceb8007609e9d98 100644 (file)
@@ -217,7 +217,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
 
        if (!ep->hcpriv) {
                cvmx_usb_transfer_t transfer_type;
-               cvmx_usb_speed_t speed;
+               enum cvmx_usb_speed speed;
                int split_device = 0;
                int split_port = 0;
                switch (usb_pipetype(urb->pipe)) {