aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/orinoco_pci.c
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-06-18 18:21:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:44 -0400
commita2608362b22ade22ef5472a8c9b82687d86f976f (patch)
tree116eb83f4bb6afc454dd5b082e8b51384477b3d3 /drivers/net/wireless/orinoco/orinoco_pci.c
parent44d8dade8f12ffe5c9b7eddd0512c1548c027a4c (diff)
orinoco: Replace net_device with orinoco_private in driver interfaces
Move away from using net_device as the main structure in orinoco function calls. Use orinoco_private instead. This makes more sense when we move to cfg80211, and we get wiphys as well. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/orinoco_pci.c')
-rw-r--r--drivers/net/wireless/orinoco/orinoco_pci.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco_pci.c b/drivers/net/wireless/orinoco/orinoco_pci.c
index 78cafff1fb2e..12b9c6a1bbec 100644
--- a/drivers/net/wireless/orinoco/orinoco_pci.c
+++ b/drivers/net/wireless/orinoco/orinoco_pci.c
@@ -139,22 +139,22 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
139 } 139 }
140 140
141 /* Allocate network device */ 141 /* Allocate network device */
142 dev = alloc_orinocodev(sizeof(*card), &pdev->dev, 142 priv = alloc_orinocodev(sizeof(*card), &pdev->dev,
143 orinoco_pci_cor_reset, NULL); 143 orinoco_pci_cor_reset, NULL);
144 if (!dev) { 144 if (!priv) {
145 printk(KERN_ERR PFX "Cannot allocate network device\n"); 145 printk(KERN_ERR PFX "Cannot allocate network device\n");
146 err = -ENOMEM; 146 err = -ENOMEM;
147 goto fail_alloc; 147 goto fail_alloc;
148 } 148 }
149 149
150 priv = netdev_priv(dev); 150 dev = priv->ndev;
151 card = priv->card; 151 card = priv->card;
152 SET_NETDEV_DEV(dev, &pdev->dev); 152 SET_NETDEV_DEV(dev, &pdev->dev);
153 153
154 hermes_struct_init(&priv->hw, hermes_io, HERMES_32BIT_REGSPACING); 154 hermes_struct_init(&priv->hw, hermes_io, HERMES_32BIT_REGSPACING);
155 155
156 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, 156 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
157 dev->name, dev); 157 dev->name, priv);
158 if (err) { 158 if (err) {
159 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); 159 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
160 err = -EBUSY; 160 err = -EBUSY;
@@ -173,18 +173,18 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
173 goto fail; 173 goto fail;
174 } 174 }
175 175
176 pci_set_drvdata(pdev, dev); 176 pci_set_drvdata(pdev, priv);
177 printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name, 177 printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name,
178 pci_name(pdev)); 178 pci_name(pdev));
179 179
180 return 0; 180 return 0;
181 181
182 fail: 182 fail:
183 free_irq(pdev->irq, dev); 183 free_irq(pdev->irq, priv);
184 184
185 fail_irq: 185 fail_irq:
186 pci_set_drvdata(pdev, NULL); 186 pci_set_drvdata(pdev, NULL);
187 free_orinocodev(dev); 187 free_orinocodev(priv);
188 188
189 fail_alloc: 189 fail_alloc:
190 pci_iounmap(pdev, hermes_io); 190 pci_iounmap(pdev, hermes_io);
@@ -200,13 +200,13 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
200 200
201static void __devexit orinoco_pci_remove_one(struct pci_dev *pdev) 201static void __devexit orinoco_pci_remove_one(struct pci_dev *pdev)
202{ 202{
203 struct net_device *dev = pci_get_drvdata(pdev); 203 struct orinoco_private *priv = pci_get_drvdata(pdev);
204 struct orinoco_private *priv = netdev_priv(dev); 204 struct net_device *dev = priv->ndev;
205 205
206 unregister_netdev(dev); 206 unregister_netdev(dev);
207 free_irq(pdev->irq, dev); 207 free_irq(pdev->irq, priv);
208 pci_set_drvdata(pdev, NULL); 208 pci_set_drvdata(pdev, NULL);
209 free_orinocodev(dev); 209 free_orinocodev(priv);
210 pci_iounmap(pdev, priv->hw.iobase); 210 pci_iounmap(pdev, priv->hw.iobase);
211 pci_release_regions(pdev); 211 pci_release_regions(pdev);
212 pci_disable_device(pdev); 212 pci_disable_device(pdev);