staging: sm750fb: remove typedef for enum
Subsystems (2)
cover staging: sm750fb: remove typedef for enum
This patchset will remove typedef for enums in sm750fb driver.
Keerthi Reddy (2):
Staging: sm750fb: remove typedef for enum in ddk750_power.{c,h}
staging: sm750fb: remove typedef for enum in ddk750_sii164.{c,h}
drivers/staging/sm750fb/ddk750_power.c | 2 +- drivers/staging/sm750fb/ddk750_power.h | 7 +++---- drivers/staging/sm750fb/ddk750_sii164.c | 3 ++- drivers/staging/sm750fb/ddk750_sii164.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 Staging: sm750fb: remove typedef for enum in ddk750_power.{c,h}
Using typedef will hide that 'DPMS_t' is enum. Removing this will make sure that we are actually working with enum. Also it is not a good coding style to use typedef
In this commit remove typedef and lowercaser the name 'DPMS_t'. And also drop '_t' which traditionally means typedef.
--- drivers/staging/sm750fb/ddk750_power.c | 2 +- drivers/staging/sm750fb/ddk750_power.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/staging/sm750fb/ddk750_power.c +1 -1
@@ -2,7 +2,7 @@#include "ddk750_reg.h" #include "ddk750_power.h" -void ddk750_set_dpms (DPMS_t state) +void ddk750_set_dpms (enum dpms state) {unsigned int value;
drivers/staging/sm750fb/ddk750_power.h +3 -4
@@ -1,20 +1,19 @@#ifndef DDK750_POWER_H__ #define DDK750_POWER_H__ -typedef enum _DPMS_t { +enum dpms { crtDPMS_ON =0x0 , crtDPMS_STANDBY =0x1 , crtDPMS_SUSPEND =0x2 , crtDPMS_OFF =0x3 , -} -DPMS_t ; +};#define setDAC (off) { \ poke32(MISC_CTRL, \ (peek32(MISC_CTRL) & ~MISC_CTRL_DAC_POWER_OFF) | (off)); \ } -void ddk750_set_dpms (DPMS_t state); +void ddk750_set_dpms (enum dpms state);void sm750_set_power_mode (unsigned int powerMode);void sm750_set_current_gate (unsigned int gate);
Signature · 1 line
2.7.4
PATCH 2/2 staging: sm750fb: remove typedef for enum in ddk750_sii164.{c,h}
In reply to Keerthi ReddyRemoving this will make sure that we are actually working with enum. Also it is not a good coding style to use typedef.
In this commit remove typedef and also drop '_t' which traditionally means typedef
--- drivers/staging/sm750fb/ddk750_sii164.c | 3 ++- drivers/staging/sm750fb/ddk750_sii164.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/staging/sm750fb/ddk750_sii164.c +2 -1
@@ -296,7 +296,8 @@ void sii164SetPower(unsigned char powerUp)* sii164SelectHotPlugDetectionMode * This function selects the mode of the hot plug detection. */ -static void sii164SelectHotPlugDetectionMode (sii164_hot_plug_mode_t hotPlugMode) +static +void sii164SelectHotPlugDetectionMode (enum sii164_hot_plug_mode hotPlugMode) {unsigned char detectReg;
drivers/staging/sm750fb/ddk750_sii164.h +2 -2
@@ -4,12 +4,12 @@#define USE_DVICHIP /* Hot Plug detection mode structure */ -typedef enum _sii164_hot_plug_mode_t { +enum sii164_hot_plug_mode {SII164_HOTPLUG_DISABLE =0 ,/* Disable Hot Plug output bit (always high). */ SII164_HOTPLUG_USE_MDI ,/* Use Monitor Detect Interrupt bit. */ SII164_HOTPLUG_USE_RSEN ,/* Use Receiver Sense detect bit. */ SII164_HOTPLUG_USE_HTPLG /* Use Hot Plug detect bit. */ -}sii164_hot_plug_mode_t ; +};/* Silicon Image SiI164 chip prototype */
Signature · 1 line
2.7.4