aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arcnet
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-08-09 12:07:18 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-11 15:19:53 -0400
commit2dfd2533e9e700661e5c9e87831fb1c4d8340176 (patch)
treef911ec78d8a1006ed29909f3c69b56c1fcfb30b8 /drivers/net/arcnet
parentf865346407ebb14dd5b6a759a356552856c714cf (diff)
com20020_cs: Remove typedef com20020_dev_t
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for com20020_dev_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/arcnet')
-rw-r--r--drivers/net/arcnet/com20020_cs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/arcnet/com20020_cs.c b/drivers/net/arcnet/com20020_cs.c
index 326a612a2730..1a790a20210d 100644
--- a/drivers/net/arcnet/com20020_cs.c
+++ b/drivers/net/arcnet/com20020_cs.c
@@ -112,20 +112,20 @@ static void com20020_detach(struct pcmcia_device *p_dev);
112 112
113/*====================================================================*/ 113/*====================================================================*/
114 114
115typedef struct com20020_dev_t { 115struct com20020_dev {
116 struct net_device *dev; 116 struct net_device *dev;
117} com20020_dev_t; 117};
118 118
119static int com20020_probe(struct pcmcia_device *p_dev) 119static int com20020_probe(struct pcmcia_device *p_dev)
120{ 120{
121 com20020_dev_t *info; 121 struct com20020_dev *info;
122 struct net_device *dev; 122 struct net_device *dev;
123 struct arcnet_local *lp; 123 struct arcnet_local *lp;
124 124
125 dev_dbg(&p_dev->dev, "com20020_attach()\n"); 125 dev_dbg(&p_dev->dev, "com20020_attach()\n");
126 126
127 /* Create new network device */ 127 /* Create new network device */
128 info = kzalloc(sizeof(struct com20020_dev_t), GFP_KERNEL); 128 info = kzalloc(sizeof(*info), GFP_KERNEL);
129 if (!info) 129 if (!info)
130 goto fail_alloc_info; 130 goto fail_alloc_info;
131 131
@@ -160,7 +160,7 @@ fail_alloc_info:
160 160
161static void com20020_detach(struct pcmcia_device *link) 161static void com20020_detach(struct pcmcia_device *link)
162{ 162{
163 struct com20020_dev_t *info = link->priv; 163 struct com20020_dev *info = link->priv;
164 struct net_device *dev = info->dev; 164 struct net_device *dev = info->dev;
165 165
166 dev_dbg(&link->dev, "detach...\n"); 166 dev_dbg(&link->dev, "detach...\n");
@@ -199,7 +199,7 @@ static void com20020_detach(struct pcmcia_device *link)
199static int com20020_config(struct pcmcia_device *link) 199static int com20020_config(struct pcmcia_device *link)
200{ 200{
201 struct arcnet_local *lp; 201 struct arcnet_local *lp;
202 com20020_dev_t *info; 202 struct com20020_dev *info;
203 struct net_device *dev; 203 struct net_device *dev;
204 int i, ret; 204 int i, ret;
205 int ioaddr; 205 int ioaddr;
@@ -291,7 +291,7 @@ static void com20020_release(struct pcmcia_device *link)
291 291
292static int com20020_suspend(struct pcmcia_device *link) 292static int com20020_suspend(struct pcmcia_device *link)
293{ 293{
294 com20020_dev_t *info = link->priv; 294 struct com20020_dev *info = link->priv;
295 struct net_device *dev = info->dev; 295 struct net_device *dev = info->dev;
296 296
297 if (link->open) 297 if (link->open)
@@ -302,7 +302,7 @@ static int com20020_suspend(struct pcmcia_device *link)
302 302
303static int com20020_resume(struct pcmcia_device *link) 303static int com20020_resume(struct pcmcia_device *link)
304{ 304{
305 com20020_dev_t *info = link->priv; 305 struct com20020_dev *info = link->priv;
306 struct net_device *dev = info->dev; 306 struct net_device *dev = info->dev;
307 307
308 if (link->open) { 308 if (link->open) {