diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-08-13 13:10:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-08-25 16:17:41 -0400 |
commit | b9395df96ac41cdfcc929f1515828709b2f64b2f (patch) | |
tree | 4857c761b1b7ab9074b06ed58317053158879f3a | |
parent | a796dac9a6bedff6db99f57828c85c97071d3d1e (diff) |
atmel_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: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/atmel_cs.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 4cfb4d99ced0..7afc9c5329fb 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -66,18 +66,18 @@ static void atmel_release(struct pcmcia_device *link); | |||
66 | 66 | ||
67 | static void atmel_detach(struct pcmcia_device *p_dev); | 67 | static void atmel_detach(struct pcmcia_device *p_dev); |
68 | 68 | ||
69 | typedef struct local_info_t { | 69 | struct local_info { |
70 | struct net_device *eth_dev; | 70 | struct net_device *eth_dev; |
71 | } local_info_t; | 71 | }; |
72 | 72 | ||
73 | static int atmel_probe(struct pcmcia_device *p_dev) | 73 | static int atmel_probe(struct pcmcia_device *p_dev) |
74 | { | 74 | { |
75 | local_info_t *local; | 75 | struct local_info *local; |
76 | 76 | ||
77 | dev_dbg(&p_dev->dev, "atmel_attach()\n"); | 77 | dev_dbg(&p_dev->dev, "atmel_attach()\n"); |
78 | 78 | ||
79 | /* Allocate space for private device-specific data */ | 79 | /* Allocate space for private device-specific data */ |
80 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); | 80 | local = kzalloc(sizeof(*local), GFP_KERNEL); |
81 | if (!local) | 81 | if (!local) |
82 | return -ENOMEM; | 82 | return -ENOMEM; |
83 | 83 | ||
@@ -117,7 +117,7 @@ static int atmel_config_check(struct pcmcia_device *p_dev, void *priv_data) | |||
117 | 117 | ||
118 | static int atmel_config(struct pcmcia_device *link) | 118 | static int atmel_config(struct pcmcia_device *link) |
119 | { | 119 | { |
120 | local_info_t *dev; | 120 | struct local_info *dev; |
121 | int ret; | 121 | int ret; |
122 | const struct pcmcia_device_id *did; | 122 | const struct pcmcia_device_id *did; |
123 | 123 | ||
@@ -141,14 +141,14 @@ static int atmel_config(struct pcmcia_device *link) | |||
141 | if (ret) | 141 | if (ret) |
142 | goto failed; | 142 | goto failed; |
143 | 143 | ||
144 | ((local_info_t*)link->priv)->eth_dev = | 144 | ((struct local_info *)link->priv)->eth_dev = |
145 | init_atmel_card(link->irq, | 145 | init_atmel_card(link->irq, |
146 | link->resource[0]->start, | 146 | link->resource[0]->start, |
147 | did ? did->driver_info : ATMEL_FW_TYPE_NONE, | 147 | did ? did->driver_info : ATMEL_FW_TYPE_NONE, |
148 | &link->dev, | 148 | &link->dev, |
149 | card_present, | 149 | card_present, |
150 | link); | 150 | link); |
151 | if (!((local_info_t*)link->priv)->eth_dev) | 151 | if (!((struct local_info *)link->priv)->eth_dev) |
152 | goto failed; | 152 | goto failed; |
153 | 153 | ||
154 | 154 | ||
@@ -161,20 +161,20 @@ static int atmel_config(struct pcmcia_device *link) | |||
161 | 161 | ||
162 | static void atmel_release(struct pcmcia_device *link) | 162 | static void atmel_release(struct pcmcia_device *link) |
163 | { | 163 | { |
164 | struct net_device *dev = ((local_info_t*)link->priv)->eth_dev; | 164 | struct net_device *dev = ((struct local_info *)link->priv)->eth_dev; |
165 | 165 | ||
166 | dev_dbg(&link->dev, "atmel_release\n"); | 166 | dev_dbg(&link->dev, "atmel_release\n"); |
167 | 167 | ||
168 | if (dev) | 168 | if (dev) |
169 | stop_atmel_card(dev); | 169 | stop_atmel_card(dev); |
170 | ((local_info_t*)link->priv)->eth_dev = NULL; | 170 | ((struct local_info *)link->priv)->eth_dev = NULL; |
171 | 171 | ||
172 | pcmcia_disable_device(link); | 172 | pcmcia_disable_device(link); |
173 | } | 173 | } |
174 | 174 | ||
175 | static int atmel_suspend(struct pcmcia_device *link) | 175 | static int atmel_suspend(struct pcmcia_device *link) |
176 | { | 176 | { |
177 | local_info_t *local = link->priv; | 177 | struct local_info *local = link->priv; |
178 | 178 | ||
179 | netif_device_detach(local->eth_dev); | 179 | netif_device_detach(local->eth_dev); |
180 | 180 | ||
@@ -183,7 +183,7 @@ static int atmel_suspend(struct pcmcia_device *link) | |||
183 | 183 | ||
184 | static int atmel_resume(struct pcmcia_device *link) | 184 | static int atmel_resume(struct pcmcia_device *link) |
185 | { | 185 | { |
186 | local_info_t *local = link->priv; | 186 | struct local_info *local = link->priv; |
187 | 187 | ||
188 | atmel_open(local->eth_dev); | 188 | atmel_open(local->eth_dev); |
189 | netif_device_attach(local->eth_dev); | 189 | netif_device_attach(local->eth_dev); |