[PATCH 07/20] staging: octeon-usb: cvmx_usb_pipe_flags_t -> enum cvmx_usb_pipe_flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace cvmx_usb_pipe_flags_t with enum cvmx_usb_pipe_flags.

Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
---
 drivers/staging/octeon-usb/cvmx-usb.c |  6 +++---
 drivers/staging/octeon-usb/cvmx-usb.h | 25 ++++++++++++++++---------
 2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/octeon-usb/cvmx-usb.c b/drivers/staging/octeon-usb/cvmx-usb.c
index 3993e3c..a77d930 100644
--- a/drivers/staging/octeon-usb/cvmx-usb.c
+++ b/drivers/staging/octeon-usb/cvmx-usb.c
@@ -150,7 +150,7 @@ typedef struct cvmx_usb_pipe {
 	cvmx_usb_transaction_t *tail;		/**< The last pending transaction */
 	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 */
+	enum cvmx_usb_pipe_flags flags;		/**< State flags for this pipe */
 	enum cvmx_usb_speed device_speed;	/**< Speed of device connected to this pipe */
 	enum cvmx_usb_transfer transfer_type;	/**< Type of transaction supported by this pipe */
 	enum cvmx_usb_direction transfer_dir;	/**< IN or OUT. Ignored for Control */
@@ -1053,7 +1053,7 @@ static inline int __cvmx_usb_get_pipe_handle(cvmx_usb_internal_state_t *usb,
  * @state:	     USB device state populated by
  *		     cvmx_usb_initialize().
  * @flags:	     Optional pipe flags defined in
- *		     cvmx_usb_pipe_flags_t.
+ *		     enum cvmx_usb_pipe_flags.
  * @device_addr:
  *		     USB device address to open the pipe to
  *		     (0-127).
@@ -1101,7 +1101,7 @@ static inline int __cvmx_usb_get_pipe_handle(cvmx_usb_internal_state_t *usb,
  * Returns: A non negative value is a pipe handle. Negative
  *	    values are error codes.
  */
-int cvmx_usb_open_pipe(cvmx_usb_state_t *state, cvmx_usb_pipe_flags_t flags,
+int cvmx_usb_open_pipe(cvmx_usb_state_t *state, enum cvmx_usb_pipe_flags flags,
 		       int device_addr, int endpoint_num,
 		       enum cvmx_usb_speed device_speed, int max_packet,
 		       enum cvmx_usb_transfer transfer_type,
diff --git a/drivers/staging/octeon-usb/cvmx-usb.h b/drivers/staging/octeon-usb/cvmx-usb.h
index 8c46ebd..6c404b0 100644
--- a/drivers/staging/octeon-usb/cvmx-usb.h
+++ b/drivers/staging/octeon-usb/cvmx-usb.h
@@ -440,15 +440,22 @@ enum cvmx_usb_initialize_flags {
 };
 
 /**
- * Flags for passing when a pipe is created. Currently no flags
- * need to be passed.
+ * enum cvmx_usb_pipe_flags - flags for passing when a pipe is created.
+ *			      Currently no flags need to be passed.
+ *
+ * @__CVMX_USB_PIPE_FLAGS_OPEN:	     Used internally to determine if a pipe is
+ *				     open. Do not use.
+ * @__CVMX_USB_PIPE_FLAGS_SCHEDULED: Used internally to determine if a pipe is
+ *				     actively using hardware. Do not use.
+ * @__CVMX_USB_PIPE_FLAGS_NEED_PING: Used internally to determine if a high
+ *				     speed pipe is in the ping state. Do not
+ *				     use.
  */
-typedef enum
-{
-    __CVMX_USB_PIPE_FLAGS_OPEN = 1<<16,         /**< Used internally to determine if a pipe is open. Do not use */
-    __CVMX_USB_PIPE_FLAGS_SCHEDULED = 1<<17,    /**< Used internally to determine if a pipe is actively using hardware. Do not use */
-    __CVMX_USB_PIPE_FLAGS_NEED_PING = 1<<18,    /**< Used internally to determine if a high speed pipe is in the ping state. Do not use */
-} cvmx_usb_pipe_flags_t;
+enum cvmx_usb_pipe_flags {
+	__CVMX_USB_PIPE_FLAGS_OPEN	= 1 << 16,
+	__CVMX_USB_PIPE_FLAGS_SCHEDULED	= 1 << 17,
+	__CVMX_USB_PIPE_FLAGS_NEED_PING	= 1 << 18,
+};
 
 extern int cvmx_usb_get_num_ports(void);
 extern int cvmx_usb_initialize(cvmx_usb_state_t *state, int usb_port_number,
@@ -459,7 +466,7 @@ 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 int cvmx_usb_open_pipe(cvmx_usb_state_t *state,
-                              cvmx_usb_pipe_flags_t flags,
+                              enum cvmx_usb_pipe_flags flags,
                               int device_addr, int endpoint_num,
                               enum cvmx_usb_speed device_speed, int max_packet,
                               enum cvmx_usb_transfer transfer_type,
-- 
1.8.3.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux