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

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 d8035bb810b80a88ed97fc107034183cd508c895..9e4bf7194ac73e301f4614b1bbb66e3c0d72acb2 100644 (file)
@@ -1901,7 +1901,7 @@ done:
 static void __cvmx_usb_perform_callback(cvmx_usb_internal_state_t *usb,
                                        cvmx_usb_pipe_t *pipe,
                                        cvmx_usb_transaction_t *transaction,
-                                       cvmx_usb_callback_t reason,
+                                       enum cvmx_usb_callback reason,
                                        enum cvmx_usb_complete complete_code)
 {
        cvmx_usb_callback_func_t callback = usb->callback[reason];
@@ -2507,7 +2507,7 @@ int cvmx_usb_close_pipe(cvmx_usb_state_t *state, int pipe_handle)
  * Returns: 0 or a negative error code.
  */
 int cvmx_usb_register_callback(cvmx_usb_state_t *state,
-                              cvmx_usb_callback_t reason,
+                              enum cvmx_usb_callback reason,
                               cvmx_usb_callback_func_t callback,
                               void *user_data)
 {
index ea1f2eefc241c73c83bae43ca06e48fb2456d693..7e1e2986d9538ec5850081ba6aa586dd9272015c 100644 (file)
  * The port callback prototype needs to look as follows:
  *
  * void port_callback(cvmx_usb_state_t *usb,
- *                    cvmx_usb_callback_t reason,
+ *                    enum cvmx_usb_callback reason,
  *                    enum cvmx_usb_complete status,
  *                    int pipe_handle,
  *                    int submit_handle,
  * The completion callback prototype needs to look as follows:
  *
  * void complete_callback(cvmx_usb_state_t *usb,
- *                        cvmx_usb_callback_t reason,
+ *                        enum cvmx_usb_callback reason,
  *                        enum cvmx_usb_complete status,
  *                        int pipe_handle,
  *                        int submit_handle,
@@ -350,21 +350,28 @@ typedef struct
 } cvmx_usb_iso_packet_t;
 
 /**
- * Possible callback reasons for the USB API.
+ * enum cvmx_usb_callback - possible callback reasons for the USB API
+ *
+ * @CVMX_USB_CALLBACK_TRANSFER_COMPLETE: A callback of this type is called when
+ *                                      a submitted transfer completes. The
+ *                                      completion callback will be called even
+ *                                      if the transfer fails or is canceled.
+ *                                      The status parameter will contain
+ *                                      details of why he callback was called.
+ * @CVMX_USB_CALLBACK_PORT_CHANGED:     The status of the port changed. For
+ *                                      example, someone may have plugged a
+ *                                      device in. The status parameter
+ *                                      contains CVMX_USB_COMPLETE_SUCCESS. Use
+ *                                      cvmx_usb_get_status() to get the new
+ *                                      port status.
+ * @__CVMX_USB_CALLBACK_END:            Do not use. Used internally for array
+ *                                      bounds.
  */
-typedef enum
-{
-    CVMX_USB_CALLBACK_TRANSFER_COMPLETE,
-                                    /**< A callback of this type is called when a submitted transfer
-                                        completes. The completion callback will be called even if the
-                                        transfer fails or is canceled. The status parameter will
-                                        contain details of why he callback was called. */
-    CVMX_USB_CALLBACK_PORT_CHANGED, /**< The status of the port changed. For example, someone may have
-                                        plugged a device in. The status parameter contains
-                                        CVMX_USB_COMPLETE_SUCCESS. Use cvmx_usb_get_status() to get
-                                        the new port status. */
-    __CVMX_USB_CALLBACK_END         /**< Do not use. Used internally for array bounds */
-} cvmx_usb_callback_t;
+enum cvmx_usb_callback {
+       CVMX_USB_CALLBACK_TRANSFER_COMPLETE,
+       CVMX_USB_CALLBACK_PORT_CHANGED,
+       __CVMX_USB_CALLBACK_END
+};
 
 /**
  * USB state internal data. The contents of this structure
@@ -381,7 +388,7 @@ typedef struct
  * The parameters are as follows:
  *      - state = USB device state populated by
  *        cvmx_usb_initialize().
- *      - reason = The cvmx_usb_callback_t used to register
+ *      - reason = The enum cvmx_usb_callback used to register
  *        the callback.
  *      - status = The enum cvmx_usb_complete representing the
  *        status code of a transaction.
@@ -395,7 +402,7 @@ typedef struct
  *        function cvmx_usb_submit() or
  *        cvmx_usb_register_callback() */
 typedef void (*cvmx_usb_callback_func_t)(cvmx_usb_state_t *state,
-                                         cvmx_usb_callback_t reason,
+                                         enum cvmx_usb_callback reason,
                                          enum cvmx_usb_complete status,
                                          int pipe_handle, int submit_handle,
                                          int bytes_transferred, void *user_data);
@@ -481,7 +488,7 @@ extern int cvmx_usb_cancel(cvmx_usb_state_t *state, int pipe_handle,
 extern int cvmx_usb_cancel_all(cvmx_usb_state_t *state, int pipe_handle);
 extern int cvmx_usb_close_pipe(cvmx_usb_state_t *state, int pipe_handle);
 extern int cvmx_usb_register_callback(cvmx_usb_state_t *state,
-                                     cvmx_usb_callback_t reason,
+                                     enum cvmx_usb_callback reason,
                                      cvmx_usb_callback_func_t callback,
                                      void *user_data);
 extern int cvmx_usb_get_frame_number(cvmx_usb_state_t *state);
index b3c287394e07cc2644df982b40f90c2e7a1ba266..5137da74c2b2755bc152dc55c437b71aac80ce3c 100644 (file)
@@ -59,7 +59,7 @@ static irqreturn_t octeon_usb_irq(struct usb_hcd *hcd)
 }
 
 static void octeon_usb_port_callback(cvmx_usb_state_t *usb,
-                                    cvmx_usb_callback_t reason,
+                                    enum cvmx_usb_callback reason,
                                     enum cvmx_usb_complete status,
                                     int pipe_handle,
                                     int submit_handle,
@@ -106,7 +106,7 @@ static int octeon_usb_get_frame_number(struct usb_hcd *hcd)
 }
 
 static void octeon_usb_urb_complete_callback(cvmx_usb_state_t *usb,
-                                            cvmx_usb_callback_t reason,
+                                            enum cvmx_usb_callback reason,
                                             enum cvmx_usb_complete status,
                                             int pipe_handle,
                                             int submit_handle,