From 154d2b8cb6c3dcf72b42eb3e335ae8f501f3472e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristina=20Mart=C5=A1enko?= Date: Mon, 3 Mar 2014 23:05:44 +0200 Subject: [PATCH] staging: sbe-2t3e3: remove t3e3_param_t typedef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Kristina Martšenko Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sbe-2t3e3/2t3e3.h | 2 +- drivers/staging/sbe-2t3e3/ctrl.c | 8 ++++---- drivers/staging/sbe-2t3e3/ctrl.h | 6 +++--- drivers/staging/sbe-2t3e3/netdev.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/sbe-2t3e3/2t3e3.h b/drivers/staging/sbe-2t3e3/2t3e3.h index f528eaa07450..bc71db4c1274 100644 --- a/drivers/staging/sbe-2t3e3/2t3e3.h +++ b/drivers/staging/sbe-2t3e3/2t3e3.h @@ -709,7 +709,7 @@ struct channel { } r; /* parameters */ - t3e3_param_t p; + struct t3e3_param p; u32 liu_regs[SBE_2T3E3_LIU_REG_MAX]; /* LIU registers */ u32 framer_regs[SBE_2T3E3_FRAMER_REG_MAX]; /* Framer registers */ diff --git a/drivers/staging/sbe-2t3e3/ctrl.c b/drivers/staging/sbe-2t3e3/ctrl.c index d280bcfd660a..a7335ae6cbd4 100644 --- a/drivers/staging/sbe-2t3e3/ctrl.c +++ b/drivers/staging/sbe-2t3e3/ctrl.c @@ -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) cpld_set_frame_mode(sc, param->frame_mode); @@ -290,7 +290,7 @@ static void t3e3_port_del_stats(struct channel *sc) void t3e3_if_config(struct channel *sc, u32 cmd, char *set, 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; /* turn off all interrupt */ diff --git a/drivers/staging/sbe-2t3e3/ctrl.h b/drivers/staging/sbe-2t3e3/ctrl.h index c11a58871845..4b480f3a8555 100644 --- a/drivers/staging/sbe-2t3e3/ctrl.h +++ b/drivers/staging/sbe-2t3e3/ctrl.h @@ -84,7 +84,7 @@ #define NG_SBE_2T3E3_NODE_TYPE "sbe2T3E3" #define NG_SBE_2T3E3_COOKIE 0x03800891 -typedef struct t3e3_param { +struct t3e3_param { u_int8_t frame_mode; /* FRAME_MODE_* */ u_int8_t crc; /* CRC_* */ u_int8_t receiver_on; /* ON/OFF */ @@ -102,7 +102,7 @@ typedef struct t3e3_param { u_int8_t fractional_mode; /* FRACTIONAL_MODE_* */ u_int8_t bandwidth_start; /* 0-255 */ u_int8_t bandwidth_stop; /* 0-255 */ -} t3e3_param_t; +}; typedef struct t3e3_stats { u_int64_t in_bytes; @@ -122,7 +122,7 @@ typedef struct t3e3_stats { typedef struct t3e3_resp { union { - t3e3_param_t param; + struct t3e3_param param; t3e3_stats_t stats; u32 data; } u; diff --git a/drivers/staging/sbe-2t3e3/netdev.c b/drivers/staging/sbe-2t3e3/netdev.c index 1f5088b3c10b..fb13e73d5233 100644 --- a/drivers/staging/sbe-2t3e3/netdev.c +++ b/drivers/staging/sbe-2t3e3/netdev.c @@ -25,7 +25,7 @@ static int t3e3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct channel *sc = dev_to_priv(dev); int cmd_2t3e3, len, rlen; - t3e3_param_t param; + struct t3e3_param param; t3e3_resp_t resp; void __user *data = ifr->ifr_data + sizeof(cmd_2t3e3) + sizeof(len);