Commit 154d2b8c authored by Kristina Martšenko's avatar Kristina Martšenko Committed by Greg Kroah-Hartman

staging: sbe-2t3e3: remove t3e3_param_t typedef

Kernel coding style does not recommend using typedefs for structures, so
remove the t3e3_param_t typedef.

Fix the following checkpatch warning:
drivers/staging/sbe-2t3e3/ctrl.h:87: WARNING: do not add new typedefs
Signed-off-by: default avatarKristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 844a18ce
...@@ -709,7 +709,7 @@ struct channel { ...@@ -709,7 +709,7 @@ struct channel {
} r; } r;
/* parameters */ /* parameters */
t3e3_param_t p; struct t3e3_param p;
u32 liu_regs[SBE_2T3E3_LIU_REG_MAX]; /* LIU registers */ u32 liu_regs[SBE_2T3E3_LIU_REG_MAX]; /* LIU registers */
u32 framer_regs[SBE_2T3E3_FRAMER_REG_MAX]; /* Framer registers */ u32 framer_regs[SBE_2T3E3_FRAMER_REG_MAX]; /* Framer registers */
......
...@@ -164,12 +164,12 @@ static void t3e3_reg_write(struct channel *sc, u32 *reg) ...@@ -164,12 +164,12 @@ static void t3e3_reg_write(struct channel *sc, u32 *reg)
} }
} }
static void t3e3_port_get(struct channel *sc, t3e3_param_t *param) static void t3e3_port_get(struct channel *sc, struct t3e3_param *param)
{ {
memcpy(param, &(sc->p), sizeof(t3e3_param_t)); memcpy(param, &(sc->p), sizeof(struct t3e3_param));
} }
static void t3e3_port_set(struct channel *sc, t3e3_param_t *param) static void t3e3_port_set(struct channel *sc, struct t3e3_param *param)
{ {
if (param->frame_mode != 0xff) if (param->frame_mode != 0xff)
cpld_set_frame_mode(sc, param->frame_mode); cpld_set_frame_mode(sc, param->frame_mode);
...@@ -290,7 +290,7 @@ static void t3e3_port_del_stats(struct channel *sc) ...@@ -290,7 +290,7 @@ static void t3e3_port_del_stats(struct channel *sc)
void t3e3_if_config(struct channel *sc, u32 cmd, char *set, void t3e3_if_config(struct channel *sc, u32 cmd, char *set,
t3e3_resp_t *ret, int *rlen) t3e3_resp_t *ret, int *rlen)
{ {
t3e3_param_t *param = (t3e3_param_t *)set; struct t3e3_param *param = (struct t3e3_param *)set;
u32 *data = (u32 *)set; u32 *data = (u32 *)set;
/* turn off all interrupt */ /* turn off all interrupt */
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
#define NG_SBE_2T3E3_NODE_TYPE "sbe2T3E3" #define NG_SBE_2T3E3_NODE_TYPE "sbe2T3E3"
#define NG_SBE_2T3E3_COOKIE 0x03800891 #define NG_SBE_2T3E3_COOKIE 0x03800891
typedef struct t3e3_param { struct t3e3_param {
u_int8_t frame_mode; /* FRAME_MODE_* */ u_int8_t frame_mode; /* FRAME_MODE_* */
u_int8_t crc; /* CRC_* */ u_int8_t crc; /* CRC_* */
u_int8_t receiver_on; /* ON/OFF */ u_int8_t receiver_on; /* ON/OFF */
...@@ -102,7 +102,7 @@ typedef struct t3e3_param { ...@@ -102,7 +102,7 @@ typedef struct t3e3_param {
u_int8_t fractional_mode; /* FRACTIONAL_MODE_* */ u_int8_t fractional_mode; /* FRACTIONAL_MODE_* */
u_int8_t bandwidth_start; /* 0-255 */ u_int8_t bandwidth_start; /* 0-255 */
u_int8_t bandwidth_stop; /* 0-255 */ u_int8_t bandwidth_stop; /* 0-255 */
} t3e3_param_t; };
typedef struct t3e3_stats { typedef struct t3e3_stats {
u_int64_t in_bytes; u_int64_t in_bytes;
...@@ -122,7 +122,7 @@ typedef struct t3e3_stats { ...@@ -122,7 +122,7 @@ typedef struct t3e3_stats {
typedef struct t3e3_resp { typedef struct t3e3_resp {
union { union {
t3e3_param_t param; struct t3e3_param param;
t3e3_stats_t stats; t3e3_stats_t stats;
u32 data; u32 data;
} u; } u;
......
...@@ -25,7 +25,7 @@ static int t3e3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -25,7 +25,7 @@ static int t3e3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{ {
struct channel *sc = dev_to_priv(dev); struct channel *sc = dev_to_priv(dev);
int cmd_2t3e3, len, rlen; int cmd_2t3e3, len, rlen;
t3e3_param_t param; struct t3e3_param param;
t3e3_resp_t resp; t3e3_resp_t resp;
void __user *data = ifr->ifr_data + sizeof(cmd_2t3e3) + sizeof(len); void __user *data = ifr->ifr_data + sizeof(cmd_2t3e3) + sizeof(len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment