aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mace.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mace.c')
-rw-r--r--drivers/net/mace.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index 77792b28602..27c24eaa241 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1996 Paul Mackerras. 5 * Copyright (C) 1996 Paul Mackerras.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/netdevice.h> 10#include <linux/netdevice.h>
@@ -114,7 +113,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
114 struct device_node *mace = macio_get_of_node(mdev); 113 struct device_node *mace = macio_get_of_node(mdev);
115 struct net_device *dev; 114 struct net_device *dev;
116 struct mace_data *mp; 115 struct mace_data *mp;
117 unsigned char *addr; 116 const unsigned char *addr;
118 int j, rev, rc = -EBUSY; 117 int j, rev, rc = -EBUSY;
119 118
120 if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) { 119 if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) {
@@ -178,7 +177,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
178 } 177 }
179 mp->chipid = (in_8(&mp->mace->chipid_hi) << 8) | 178 mp->chipid = (in_8(&mp->mace->chipid_hi) << 8) |
180 in_8(&mp->mace->chipid_lo); 179 in_8(&mp->mace->chipid_lo);
181 180
182 181
183 mp = (struct mace_data *) dev->priv; 182 mp = (struct mace_data *) dev->priv;
184 mp->maccc = ENXMT | ENRCV; 183 mp->maccc = ENXMT | ENRCV;
@@ -220,7 +219,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
220 mp->port_aaui = 1; 219 mp->port_aaui = 1;
221#else 220#else
222 mp->port_aaui = 0; 221 mp->port_aaui = 0;
223#endif 222#endif
224 } 223 }
225 } 224 }
226 225
@@ -243,12 +242,12 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
243 } 242 }
244 rc = request_irq(mp->tx_dma_intr, mace_txdma_intr, 0, "MACE-txdma", dev); 243 rc = request_irq(mp->tx_dma_intr, mace_txdma_intr, 0, "MACE-txdma", dev);
245 if (rc) { 244 if (rc) {
246 printk(KERN_ERR "MACE: can't get irq %d\n", mace->intrs[1].line); 245 printk(KERN_ERR "MACE: can't get irq %d\n", mp->tx_dma_intr);
247 goto err_free_irq; 246 goto err_free_irq;
248 } 247 }
249 rc = request_irq(mp->rx_dma_intr, mace_rxdma_intr, 0, "MACE-rxdma", dev); 248 rc = request_irq(mp->rx_dma_intr, mace_rxdma_intr, 0, "MACE-rxdma", dev);
250 if (rc) { 249 if (rc) {
251 printk(KERN_ERR "MACE: can't get irq %d\n", mace->intrs[2].line); 250 printk(KERN_ERR "MACE: can't get irq %d\n", mp->rx_dma_intr);
252 goto err_free_tx_irq; 251 goto err_free_tx_irq;
253 } 252 }
254 253
@@ -265,7 +264,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
265 printk(", chip revision %d.%d\n", mp->chipid >> 8, mp->chipid & 0xff); 264 printk(", chip revision %d.%d\n", mp->chipid >> 8, mp->chipid & 0xff);
266 265
267 return 0; 266 return 0;
268 267
269 err_free_rx_irq: 268 err_free_rx_irq:
270 free_irq(macio_irq(mdev, 2), dev); 269 free_irq(macio_irq(mdev, 2), dev);
271 err_free_tx_irq: 270 err_free_tx_irq:
@@ -1009,7 +1008,7 @@ static irqreturn_t mace_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs)
1009 return IRQ_HANDLED; 1008 return IRQ_HANDLED;
1010} 1009}
1011 1010
1012static struct of_device_id mace_match[] = 1011static struct of_device_id mace_match[] =
1013{ 1012{
1014 { 1013 {
1015 .name = "mace", 1014 .name = "mace",
@@ -1018,7 +1017,7 @@ static struct of_device_id mace_match[] =
1018}; 1017};
1019MODULE_DEVICE_TABLE (of, mace_match); 1018MODULE_DEVICE_TABLE (of, mace_match);
1020 1019
1021static struct macio_driver mace_driver = 1020static struct macio_driver mace_driver =
1022{ 1021{
1023 .name = "mace", 1022 .name = "mace",
1024 .match_table = mace_match, 1023 .match_table = mace_match,