staging: sbe-2t3e3: remove t3e3_param_t typedef
authorKristina Martšenko <kristina.martsenko@gmail.com>
Mon, 3 Mar 2014 21:05:44 +0000 (23:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 21:32:48 +0000 (13:32 -0800)
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 <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sbe-2t3e3/2t3e3.h
drivers/staging/sbe-2t3e3/ctrl.c
drivers/staging/sbe-2t3e3/ctrl.h
drivers/staging/sbe-2t3e3/netdev.c

index f528eaa074509a2c7c773ebd3dec1c574854d773..bc71db4c1274b6a3e171d9f0c05e83ede0dfcd1d 100644 (file)
@@ -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 */
index d280bcfd660a0369c2f2caee55b395798a6cc143..a7335ae6cbd44c4a980c2fa4429e261fd22b6798 100644 (file)
@@ -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 */
index c11a58871845439767ad42aebe0ddccab5f52123..4b480f3a8555ffec735b8c13cd54fc50165f95b1 100644 (file)
@@ -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;
index 1f5088b3c10b59ab479cb1aedc9483f3fe3df535..fb13e73d523321c2bf32ecc15f11526bc148e56c 100644 (file)
@@ -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);