aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun/sunhme.c
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2012-03-09 13:54:04 -0500
committerFrancois Romieu <romieu@fr.zoreil.com>2012-04-07 05:47:03 -0400
commit7deb1182175ee06cfcea40452d4f2fb1e33fcbb8 (patch)
tree2b457425ad385fac73a959fc6914781a2c2ea947 /drivers/net/ethernet/sun/sunhme.c
parenta173460a6391ed5c38b63bcaedc6afc30f4de3b2 (diff)
sunhme: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net/ethernet/sun/sunhme.c')
-rw-r--r--drivers/net/ethernet/sun/sunhme.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index 8b627e2f798d..afb19a6d7c52 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2183,11 +2183,12 @@ static int happy_meal_open(struct net_device *dev)
2183 * into a single source which we register handling at probe time. 2183 * into a single source which we register handling at probe time.
2184 */ 2184 */
2185 if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) { 2185 if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) {
2186 if (request_irq(dev->irq, happy_meal_interrupt, 2186 res = request_irq(hp->irq, happy_meal_interrupt, IRQF_SHARED,
2187 IRQF_SHARED, dev->name, (void *)dev)) { 2187 dev->name, dev);
2188 if (res) {
2188 HMD(("EAGAIN\n")); 2189 HMD(("EAGAIN\n"));
2189 printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n", 2190 printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n",
2190 dev->irq); 2191 hp->irq);
2191 2192
2192 return -EAGAIN; 2193 return -EAGAIN;
2193 } 2194 }
@@ -2200,7 +2201,7 @@ static int happy_meal_open(struct net_device *dev)
2200 spin_unlock_irq(&hp->happy_lock); 2201 spin_unlock_irq(&hp->happy_lock);
2201 2202
2202 if (res && ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO)) 2203 if (res && ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO))
2203 free_irq(dev->irq, dev); 2204 free_irq(hp->irq, dev);
2204 return res; 2205 return res;
2205} 2206}
2206 2207
@@ -2222,7 +2223,7 @@ static int happy_meal_close(struct net_device *dev)
2222 * time and never unregister. 2223 * time and never unregister.
2223 */ 2224 */
2224 if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) 2225 if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO)
2225 free_irq(dev->irq, dev); 2226 free_irq(hp->irq, dev);
2226 2227
2227 return 0; 2228 return 0;
2228} 2229}
@@ -2778,7 +2779,7 @@ static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int i
2778 dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM; 2779 dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
2779 dev->features |= dev->hw_features | NETIF_F_RXCSUM; 2780 dev->features |= dev->hw_features | NETIF_F_RXCSUM;
2780 2781
2781 dev->irq = op->archdata.irqs[0]; 2782 hp->irq = op->archdata.irqs[0];
2782 2783
2783#if defined(CONFIG_SBUS) && defined(CONFIG_PCI) 2784#if defined(CONFIG_SBUS) && defined(CONFIG_PCI)
2784 /* Hook up SBUS register/descriptor accessors. */ 2785 /* Hook up SBUS register/descriptor accessors. */
@@ -2982,8 +2983,6 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
2982 if (hme_version_printed++ == 0) 2983 if (hme_version_printed++ == 0)
2983 printk(KERN_INFO "%s", version); 2984 printk(KERN_INFO "%s", version);
2984 2985
2985 dev->base_addr = (long) pdev;
2986
2987 hp = netdev_priv(dev); 2986 hp = netdev_priv(dev);
2988 2987
2989 hp->happy_dev = pdev; 2988 hp->happy_dev = pdev;
@@ -3088,12 +3087,11 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
3088 3087
3089 init_timer(&hp->happy_timer); 3088 init_timer(&hp->happy_timer);
3090 3089
3090 hp->irq = pdev->irq;
3091 hp->dev = dev; 3091 hp->dev = dev;
3092 dev->netdev_ops = &hme_netdev_ops; 3092 dev->netdev_ops = &hme_netdev_ops;
3093 dev->watchdog_timeo = 5*HZ; 3093 dev->watchdog_timeo = 5*HZ;
3094 dev->ethtool_ops = &hme_ethtool_ops; 3094 dev->ethtool_ops = &hme_ethtool_ops;
3095 dev->irq = pdev->irq;
3096 dev->dma = 0;
3097 3095
3098 /* Happy Meal can do it all... */ 3096 /* Happy Meal can do it all... */
3099 dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM; 3097 dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;