diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-06-18 18:21:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:44 -0400 |
commit | a2608362b22ade22ef5472a8c9b82687d86f976f (patch) | |
tree | 116eb83f4bb6afc454dd5b082e8b51384477b3d3 /drivers/net/wireless/orinoco/orinoco_tmd.c | |
parent | 44d8dade8f12ffe5c9b7eddd0512c1548c027a4c (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_tmd.c')
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco_tmd.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco_tmd.c b/drivers/net/wireless/orinoco/orinoco_tmd.c index cda0e6e4d7a1..5f24c0332de9 100644 --- a/drivers/net/wireless/orinoco/orinoco_tmd.c +++ b/drivers/net/wireless/orinoco/orinoco_tmd.c | |||
@@ -124,15 +124,15 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, | |||
124 | } | 124 | } |
125 | 125 | ||
126 | /* Allocate network device */ | 126 | /* Allocate network device */ |
127 | dev = alloc_orinocodev(sizeof(*card), &pdev->dev, | 127 | priv = alloc_orinocodev(sizeof(*card), &pdev->dev, |
128 | orinoco_tmd_cor_reset, NULL); | 128 | orinoco_tmd_cor_reset, NULL); |
129 | if (!dev) { | 129 | if (!priv) { |
130 | printk(KERN_ERR PFX "Cannot allocate network device\n"); | 130 | printk(KERN_ERR PFX "Cannot allocate network device\n"); |
131 | err = -ENOMEM; | 131 | err = -ENOMEM; |
132 | goto fail_alloc; | 132 | goto fail_alloc; |
133 | } | 133 | } |
134 | 134 | ||
135 | priv = netdev_priv(dev); | 135 | dev = priv->ndev; |
136 | card = priv->card; | 136 | card = priv->card; |
137 | card->bridge_io = bridge_io; | 137 | card->bridge_io = bridge_io; |
138 | SET_NETDEV_DEV(dev, &pdev->dev); | 138 | SET_NETDEV_DEV(dev, &pdev->dev); |
@@ -140,7 +140,7 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, | |||
140 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); | 140 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); |
141 | 141 | ||
142 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, | 142 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, |
143 | dev->name, dev); | 143 | dev->name, priv); |
144 | if (err) { | 144 | if (err) { |
145 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); | 145 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); |
146 | err = -EBUSY; | 146 | err = -EBUSY; |
@@ -159,18 +159,18 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, | |||
159 | goto fail; | 159 | goto fail; |
160 | } | 160 | } |
161 | 161 | ||
162 | pci_set_drvdata(pdev, dev); | 162 | pci_set_drvdata(pdev, priv); |
163 | printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name, | 163 | printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name, |
164 | pci_name(pdev)); | 164 | pci_name(pdev)); |
165 | 165 | ||
166 | return 0; | 166 | return 0; |
167 | 167 | ||
168 | fail: | 168 | fail: |
169 | free_irq(pdev->irq, dev); | 169 | free_irq(pdev->irq, priv); |
170 | 170 | ||
171 | fail_irq: | 171 | fail_irq: |
172 | pci_set_drvdata(pdev, NULL); | 172 | pci_set_drvdata(pdev, NULL); |
173 | free_orinocodev(dev); | 173 | free_orinocodev(priv); |
174 | 174 | ||
175 | fail_alloc: | 175 | fail_alloc: |
176 | pci_iounmap(pdev, hermes_io); | 176 | pci_iounmap(pdev, hermes_io); |
@@ -189,14 +189,14 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, | |||
189 | 189 | ||
190 | static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev) | 190 | static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev) |
191 | { | 191 | { |
192 | struct net_device *dev = pci_get_drvdata(pdev); | 192 | struct orinoco_private *priv = pci_get_drvdata(pdev); |
193 | struct orinoco_private *priv = netdev_priv(dev); | 193 | struct net_device *dev = priv->ndev; |
194 | struct orinoco_pci_card *card = priv->card; | 194 | struct orinoco_pci_card *card = priv->card; |
195 | 195 | ||
196 | unregister_netdev(dev); | 196 | unregister_netdev(dev); |
197 | free_irq(pdev->irq, dev); | 197 | free_irq(pdev->irq, priv); |
198 | pci_set_drvdata(pdev, NULL); | 198 | pci_set_drvdata(pdev, NULL); |
199 | free_orinocodev(dev); | 199 | free_orinocodev(priv); |
200 | pci_iounmap(pdev, priv->hw.iobase); | 200 | pci_iounmap(pdev, priv->hw.iobase); |
201 | pci_iounmap(pdev, card->bridge_io); | 201 | pci_iounmap(pdev, card->bridge_io); |
202 | pci_release_regions(pdev); | 202 | pci_release_regions(pdev); |