diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2016-02-21 03:12:11 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 14:43:48 -0800 |
commit | 6a707a9eb9de373ba3ed2f85d44dce8bda229afc (patch) | |
tree | 293f1013a8829e4f3a7e45baf58ccaa04204af24 /drivers/staging/wilc1000/wilc_wlan_cfg.c | |
parent | 5bc32160c543de5cab9bc38cc048e1334e881b98 (diff) | |
download | op-kernel-dev-6a707a9eb9de373ba3ed2f85d44dce8bda229afc.zip op-kernel-dev-6a707a9eb9de373ba3ed2f85d44dce8bda229afc.tar.gz |
Staging: wilc1000: Remove and rename struct typedefs from .c files
Using typedef for a structure type is not suggested in Linux kernel coding
style guidelines. So remove typedefs from structures wilc_sdio_t,
wilc_spi_t and wilc_mac_cfg_t.
Also remove '_t' suffix from the struct names by hand.
The following semantic patch detects cases:
@tn1@
type td;
@@
typedef struct { ... } td;
@script:python tf@
td << tn1.td;
tdres;
@@
coccinelle.tdres = td;
@@ type tn1.td;
identifier tf.tdres;
@@
-typedef
struct
+ tdres
{ ... }
-td
;
@@ type tn1.td;
identifier tf.tdres;
@@
-td
+ struct tdres
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wlan_cfg.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wlan_cfg.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index 9dab247..56455f4 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -19,7 +19,7 @@ * ********************************************/ -typedef struct { +struct wilc_mac_cfg { wilc_debug_func dPrint; int mac_status; @@ -40,9 +40,9 @@ typedef struct { u8 firmware_info[8]; u8 scan_result[256]; u8 scan_result1[256]; -} wilc_mac_cfg_t; +}; -static wilc_mac_cfg_t g_mac; +static struct wilc_mac_cfg g_mac; static struct wilc_cfg_byte g_cfg_byte[] = { {WID_BSS_TYPE, 0}, @@ -349,7 +349,7 @@ static void wilc_wlan_parse_response_frame(u8 *info, int size) static int wilc_wlan_parse_info_frame(u8 *info, int size) { - wilc_mac_cfg_t *pd = &g_mac; + struct wilc_mac_cfg *pd = &g_mac; u32 wid, len; int type = WILC_CFG_RSP_STATUS; @@ -539,7 +539,7 @@ int wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size, int wilc_wlan_cfg_init(wilc_debug_func func) { - memset((void *)&g_mac, 0, sizeof(wilc_mac_cfg_t)); + memset((void *)&g_mac, 0, sizeof(struct wilc_mac_cfg)); g_mac.dPrint = func; return 1; } |