diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-08-09 12:46:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-11 15:19:53 -0400 |
commit | 61ecba6422a34aaa1956119607a25ff57c1c61a4 (patch) | |
tree | 8eca9d738557e3435e4789662a0c1ba8195212a0 /drivers/net | |
parent | f0db82a5775d1c4c09fa543321079e2a8334a914 (diff) |
airo_cs: Remove typedef local_info_t
The Linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedef for
local_info_t. Also, the name of the struct is changed to drop the _t,
to make the name look less typedef-like.
The following Coccinelle semantic patch detects the case:
@tn@
identifier i;
type td;
@@
-typedef
struct i { ... }
-td
;
@@
type tn.td;
identifier tn.i;
@@
-td
+ struct i
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/airo_cs.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index 7e9ede6c5798..d9ed22b4cc6b 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -56,18 +56,18 @@ static void airo_release(struct pcmcia_device *link); | |||
56 | 56 | ||
57 | static void airo_detach(struct pcmcia_device *p_dev); | 57 | static void airo_detach(struct pcmcia_device *p_dev); |
58 | 58 | ||
59 | typedef struct local_info_t { | 59 | struct local_info { |
60 | struct net_device *eth_dev; | 60 | struct net_device *eth_dev; |
61 | } local_info_t; | 61 | }; |
62 | 62 | ||
63 | static int airo_probe(struct pcmcia_device *p_dev) | 63 | static int airo_probe(struct pcmcia_device *p_dev) |
64 | { | 64 | { |
65 | local_info_t *local; | 65 | struct local_info *local; |
66 | 66 | ||
67 | dev_dbg(&p_dev->dev, "airo_attach()\n"); | 67 | dev_dbg(&p_dev->dev, "airo_attach()\n"); |
68 | 68 | ||
69 | /* Allocate space for private device-specific data */ | 69 | /* Allocate space for private device-specific data */ |
70 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); | 70 | local = kzalloc(sizeof(*local), GFP_KERNEL); |
71 | if (!local) | 71 | if (!local) |
72 | return -ENOMEM; | 72 | return -ENOMEM; |
73 | 73 | ||
@@ -82,10 +82,11 @@ static void airo_detach(struct pcmcia_device *link) | |||
82 | 82 | ||
83 | airo_release(link); | 83 | airo_release(link); |
84 | 84 | ||
85 | if (((local_info_t *)link->priv)->eth_dev) { | 85 | if (((struct local_info *)link->priv)->eth_dev) { |
86 | stop_airo_card(((local_info_t *)link->priv)->eth_dev, 0); | 86 | stop_airo_card(((struct local_info *)link->priv)->eth_dev, |
87 | 0); | ||
87 | } | 88 | } |
88 | ((local_info_t *)link->priv)->eth_dev = NULL; | 89 | ((struct local_info *)link->priv)->eth_dev = NULL; |
89 | 90 | ||
90 | kfree(link->priv); | 91 | kfree(link->priv); |
91 | } /* airo_detach */ | 92 | } /* airo_detach */ |
@@ -101,7 +102,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) | |||
101 | 102 | ||
102 | static int airo_config(struct pcmcia_device *link) | 103 | static int airo_config(struct pcmcia_device *link) |
103 | { | 104 | { |
104 | local_info_t *dev; | 105 | struct local_info *dev; |
105 | int ret; | 106 | int ret; |
106 | 107 | ||
107 | dev = link->priv; | 108 | dev = link->priv; |
@@ -121,10 +122,10 @@ static int airo_config(struct pcmcia_device *link) | |||
121 | ret = pcmcia_enable_device(link); | 122 | ret = pcmcia_enable_device(link); |
122 | if (ret) | 123 | if (ret) |
123 | goto failed; | 124 | goto failed; |
124 | ((local_info_t *)link->priv)->eth_dev = | 125 | ((struct local_info *)link->priv)->eth_dev = |
125 | init_airo_card(link->irq, | 126 | init_airo_card(link->irq, |
126 | link->resource[0]->start, 1, &link->dev); | 127 | link->resource[0]->start, 1, &link->dev); |
127 | if (!((local_info_t *)link->priv)->eth_dev) | 128 | if (!((struct local_info *)link->priv)->eth_dev) |
128 | goto failed; | 129 | goto failed; |
129 | 130 | ||
130 | return 0; | 131 | return 0; |
@@ -142,7 +143,7 @@ static void airo_release(struct pcmcia_device *link) | |||
142 | 143 | ||
143 | static int airo_suspend(struct pcmcia_device *link) | 144 | static int airo_suspend(struct pcmcia_device *link) |
144 | { | 145 | { |
145 | local_info_t *local = link->priv; | 146 | struct local_info *local = link->priv; |
146 | 147 | ||
147 | netif_device_detach(local->eth_dev); | 148 | netif_device_detach(local->eth_dev); |
148 | 149 | ||
@@ -151,7 +152,7 @@ static int airo_suspend(struct pcmcia_device *link) | |||
151 | 152 | ||
152 | static int airo_resume(struct pcmcia_device *link) | 153 | static int airo_resume(struct pcmcia_device *link) |
153 | { | 154 | { |
154 | local_info_t *local = link->priv; | 155 | struct local_info *local = link->priv; |
155 | 156 | ||
156 | if (link->open) { | 157 | if (link->open) { |
157 | reset_airo_card(local->eth_dev); | 158 | reset_airo_card(local->eth_dev); |