]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: octeon-usb: cvmx_usb_iso_packet_t -> struct cvmx_usb_iso_packet
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 30 Jul 2013 20:43:04 +0000 (23:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Aug 2013 00:51:43 +0000 (17:51 -0700)
Replace cvmx_usb_iso_packet_t with struct cvmx_usb_iso_packet.

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 c92b15f30feac7214ed481f90c8b69a3065c5313..6c79cc15b5168f566f3c4110039d6c6b3cdfc49b 100644 (file)
@@ -129,7 +129,7 @@ typedef struct cvmx_usb_transaction {
        uint64_t control_header;                /**< For control transactions, physical address of the 8 byte standard header */
        int iso_start_frame;                    /**< For ISO transactions, the starting frame number */
        int iso_number_packets;                 /**< For ISO transactions, the number of packets in the request */
-       cvmx_usb_iso_packet_t *iso_packets;     /**< For ISO transactions, the sub packets in the request */
+       struct cvmx_usb_iso_packet *iso_packets;/**< For ISO transactions, the sub packets in the request */
        int xfersize;
        int pktcnt;
        int retries;
@@ -2032,7 +2032,7 @@ static int __cvmx_usb_submit_transaction(cvmx_usb_internal_state_t *usb,
                                         uint64_t control_header,
                                         int iso_start_frame,
                                         int iso_number_packets,
-                                        cvmx_usb_iso_packet_t *iso_packets,
+                                        struct cvmx_usb_iso_packet *iso_packets,
                                         cvmx_usb_callback_func_t callback,
                                         void *user_data)
 {
@@ -2298,7 +2298,7 @@ int cvmx_usb_submit_control(cvmx_usb_state_t *state, int pipe_handle,
  *                 "packets" is a pointer to an array of this
  *                 many packet structures.
  * @packets:       Description of each transfer packet as
- *                 defined by cvmx_usb_iso_packet_t. The array
+ *                 defined by struct cvmx_usb_iso_packet. The array
  *                 pointed to here must stay valid until the
  *                 complete callback is called.
  * @buffer:        Physical address of the data buffer in
@@ -2327,7 +2327,7 @@ int cvmx_usb_submit_control(cvmx_usb_state_t *state, int pipe_handle,
 int cvmx_usb_submit_isochronous(cvmx_usb_state_t *state, int pipe_handle,
                                int start_frame, int flags,
                                int number_packets,
-                               cvmx_usb_iso_packet_t packets[],
+                               struct cvmx_usb_iso_packet packets[],
                                uint64_t buffer, int buffer_length,
                                cvmx_usb_callback_func_t callback,
                                void *user_data)
index 9c7ff4a6c52e4a6c6ae6c927cab99a6edf276873..b0d0f6aab5d16d91bdb8f9cded3e4d839ad178ed 100644 (file)
@@ -351,14 +351,18 @@ typedef union
 } cvmx_usb_control_header_t;
 
 /**
- * Descriptor for Isochronous packets
+ * struct cvmx_usb_iso_packet - descriptor for Isochronous packets
+ *
+ * @offset:    This is the offset in bytes into the main buffer where this data
+ *             is stored.
+ * @length:    This is the length in bytes of the data.
+ * @status:    This is the status of this individual packet transfer.
  */
-typedef struct
-{
-    int offset;                     /**< This is the offset in bytes into the main buffer where this data is stored */
-    int length;                     /**< This is the length in bytes of the data */
-    enum cvmx_usb_complete status;  /**< This is the status of this individual packet transfer */
-} cvmx_usb_iso_packet_t;
+struct cvmx_usb_iso_packet {
+       int offset;
+       int length;
+       enum cvmx_usb_complete status;
+};
 
 /**
  * enum cvmx_usb_callback - possible callback reasons for the USB API
@@ -516,7 +520,7 @@ enum cvmx_usb_isochronous_flags {
 extern int cvmx_usb_submit_isochronous(cvmx_usb_state_t *state, int pipe_handle,
                                        int start_frame, int flags,
                                        int number_packets,
-                                       cvmx_usb_iso_packet_t packets[],
+                                       struct cvmx_usb_iso_packet packets[],
                                        uint64_t buffer, int buffer_length,
                                        cvmx_usb_callback_func_t callback,
                                        void *user_data);
index 8a41d092b08b31802cb79a32a760eba8ac1ed84e..319f2e15662adf34e30b6abdc2cb7f9eddd80c61 100644 (file)
@@ -141,7 +141,8 @@ static void octeon_usb_urb_complete_callback(cvmx_usb_state_t *usb,
                 * The pointer to the private list is stored in the setup_packet
                 * field.
                 */
-               cvmx_usb_iso_packet_t *iso_packet = (cvmx_usb_iso_packet_t *) urb->setup_packet;
+               struct cvmx_usb_iso_packet *iso_packet =
+                       (struct cvmx_usb_iso_packet *) urb->setup_packet;
                /* Recalculate the transfer size by adding up each packet */
                urb->actual_length = 0;
                for (i = 0; i < urb->number_of_packets; i++) {
@@ -208,7 +209,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
        int submit_handle = -1;
        int pipe_handle;
        unsigned long flags;
-       cvmx_usb_iso_packet_t *iso_packet;
+       struct cvmx_usb_iso_packet *iso_packet;
        struct usb_host_endpoint *ep = urb->ep;
 
        urb->status = 0;
@@ -305,7 +306,9 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
                 * Allocate a structure to use for our private list of
                 * isochronous packets.
                 */
-               iso_packet = kmalloc(urb->number_of_packets * sizeof(cvmx_usb_iso_packet_t), GFP_ATOMIC);
+               iso_packet = kmalloc(urb->number_of_packets *
+                                    sizeof(struct cvmx_usb_iso_packet),
+                                    GFP_ATOMIC);
                if (iso_packet) {
                        int i;
                        /* Fill the list with the data from the URB */