Skip to contentSkip to conversation

staging: vt6656: device.h Remove typedef enum __device_init_type.

PATCH New Malcolm Priestley 1 participant 1 message Nov 3, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/5 staging: vt6656: device.h Remove typedef enum __device_init_type.

Since typedef enum __device_init_type is only ever called in one state.

Remove the typedef from main_usb.c:device_init_registers and replace with macro values. The other values may be needed later.

Apply cold value to sInitCmd.byInitClass.

Remove if braces and correct formatting within.

---
 drivers/staging/vt6656/device.h   |   8 +-
 drivers/staging/vt6656/main_usb.c | 274 +++++++++++++++++++-------------------
 2 files changed, 143 insertions(+), 139 deletions(-)
drivers/staging/vt6656/device.h +3 -5
index 62b7de1..ef2b922 100644
@@ -149,11 +149,9 @@ typedef enum __device_msg_level {
 	MSG_LEVEL_DEBUG = 4           /* Only for debug purpose. */
 } DEVICE_MSG_LEVEL, *PDEVICE_MSG_LEVEL;
 
-typedef enum __device_init_type {
-	DEVICE_INIT_COLD = 0,       /* cold init */
-	DEVICE_INIT_RESET,          /* reset init or Dx to D0 power remain */
-	DEVICE_INIT_DXPL            /* Dx to D0 power lost init */
-} DEVICE_INIT_TYPE, *PDEVICE_INIT_TYPE;
+#define DEVICE_INIT_COLD	0x0 /* cold init */
+#define DEVICE_INIT_RESET	0x1 /* reset init or Dx to D0 power remain */
+#define DEVICE_INIT_DXPL	0x2 /* Dx to D0 power lost init */
 
 /* USB */
 
drivers/staging/vt6656/main_usb.c +140 -134

381 lines not on this page · raw message

Signature · 1 line
1.8.3.2