Commit 7deb1182175ee06cfcea40452d4f2fb1e33fcbb8
1 parent
a173460a63
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
sunhme: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Showing 2 changed files with 9 additions and 10 deletions Side-by-side Diff
drivers/net/ethernet/sun/sunhme.c
... | ... | @@ -2183,11 +2183,12 @@ |
2183 | 2183 | * into a single source which we register handling at probe time. |
2184 | 2184 | */ |
2185 | 2185 | if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) { |
2186 | - if (request_irq(dev->irq, happy_meal_interrupt, | |
2187 | - IRQF_SHARED, dev->name, (void *)dev)) { | |
2186 | + res = request_irq(hp->irq, happy_meal_interrupt, IRQF_SHARED, | |
2187 | + dev->name, dev); | |
2188 | + if (res) { | |
2188 | 2189 | HMD(("EAGAIN\n")); |
2189 | 2190 | printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n", |
2190 | - dev->irq); | |
2191 | + hp->irq); | |
2191 | 2192 | |
2192 | 2193 | return -EAGAIN; |
2193 | 2194 | } |
... | ... | @@ -2200,7 +2201,7 @@ |
2200 | 2201 | spin_unlock_irq(&hp->happy_lock); |
2201 | 2202 | |
2202 | 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 | 2205 | return res; |
2205 | 2206 | } |
2206 | 2207 | |
... | ... | @@ -2222,7 +2223,7 @@ |
2222 | 2223 | * time and never unregister. |
2223 | 2224 | */ |
2224 | 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 | 2228 | return 0; |
2228 | 2229 | } |
... | ... | @@ -2778,7 +2779,7 @@ |
2778 | 2779 | dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM; |
2779 | 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 | 2784 | #if defined(CONFIG_SBUS) && defined(CONFIG_PCI) |
2784 | 2785 | /* Hook up SBUS register/descriptor accessors. */ |
... | ... | @@ -2982,8 +2983,6 @@ |
2982 | 2983 | if (hme_version_printed++ == 0) |
2983 | 2984 | printk(KERN_INFO "%s", version); |
2984 | 2985 | |
2985 | - dev->base_addr = (long) pdev; | |
2986 | - | |
2987 | 2986 | hp = netdev_priv(dev); |
2988 | 2987 | |
2989 | 2988 | hp->happy_dev = pdev; |
2990 | 2989 | |
... | ... | @@ -3088,12 +3087,11 @@ |
3088 | 3087 | |
3089 | 3088 | init_timer(&hp->happy_timer); |
3090 | 3089 | |
3090 | + hp->irq = pdev->irq; | |
3091 | 3091 | hp->dev = dev; |
3092 | 3092 | dev->netdev_ops = &hme_netdev_ops; |
3093 | 3093 | dev->watchdog_timeo = 5*HZ; |
3094 | 3094 | dev->ethtool_ops = &hme_ethtool_ops; |
3095 | - dev->irq = pdev->irq; | |
3096 | - dev->dma = 0; | |
3097 | 3095 | |
3098 | 3096 | /* Happy Meal can do it all... */ |
3099 | 3097 | dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM; |
drivers/net/ethernet/sun/sunhme.h
... | ... | @@ -432,6 +432,7 @@ |
432 | 432 | |
433 | 433 | dma_addr_t hblock_dvma; /* DVMA visible address happy block */ |
434 | 434 | unsigned int happy_flags; /* Driver state flags */ |
435 | + int irq; | |
435 | 436 | enum happy_transceiver tcvr_type; /* Kind of transceiver in use */ |
436 | 437 | unsigned int happy_bursts; /* Get your mind out of the gutter */ |
437 | 438 | unsigned int paddr; /* PHY address for transceiver */ |