aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/airo_cs.c')
-rw-r--r--drivers/net/wireless/airo_cs.c25
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
57static void airo_detach(struct pcmcia_device *p_dev); 57static void airo_detach(struct pcmcia_device *p_dev);
58 58
59typedef struct local_info_t { 59struct local_info {
60 struct net_device *eth_dev; 60 struct net_device *eth_dev;
61} local_info_t; 61};
62 62
63static int airo_probe(struct pcmcia_device *p_dev) 63static 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
102static int airo_config(struct pcmcia_device *link) 103static 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
143static int airo_suspend(struct pcmcia_device *link) 144static 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
152static int airo_resume(struct pcmcia_device *link) 153static 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);