aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/apple
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2011-09-13 03:30:25 -0400
committerDavid S. Miller <davem@davemloft.net>2011-09-21 15:31:35 -0400
commitce43aa6c142d69820a267431ea342d1bd9f6d3ce (patch)
tree65f1f4b3d0e4acc55f282e11eebb3e14fd959fbf /drivers/net/ethernet/apple
parent0c070900f64ef37daf198eea5ef778eb8dba5020 (diff)
macmace, macsonic: cleanup
We check ether_type before registering the platform device in arch/m68k/mac/config.c. Doing the same test again in the driver is redundant so remove it. Multiple probes should not happen since the conversion to platform devices, so lose that test too. Then macmace.c need not include macintosh.h, so remove that and irq.h and include linux/interrupt.h explicitly. Tested on PowerBook 520, Quadra 660av, LC 630. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/apple')
-rw-r--r--drivers/net/ethernet/apple/macmace.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index 6cd3f8646dcd..7cf81bbffe0e 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -31,9 +31,8 @@
31#include <linux/dma-mapping.h> 31#include <linux/dma-mapping.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/gfp.h> 33#include <linux/gfp.h>
34#include <linux/interrupt.h>
34#include <asm/io.h> 35#include <asm/io.h>
35#include <asm/irq.h>
36#include <asm/macintosh.h>
37#include <asm/macints.h> 36#include <asm/macints.h>
38#include <asm/mac_psc.h> 37#include <asm/mac_psc.h>
39#include <asm/page.h> 38#include <asm/page.h>
@@ -203,14 +202,8 @@ static int __devinit mace_probe(struct platform_device *pdev)
203 unsigned char *addr; 202 unsigned char *addr;
204 struct net_device *dev; 203 struct net_device *dev;
205 unsigned char checksum = 0; 204 unsigned char checksum = 0;
206 static int found = 0;
207 int err; 205 int err;
208 206
209 if (found || macintosh_config->ether_type != MAC_ETHER_MACE)
210 return -ENODEV;
211
212 found = 1; /* prevent 'finding' one on every device probe */
213
214 dev = alloc_etherdev(PRIV_BYTES); 207 dev = alloc_etherdev(PRIV_BYTES);
215 if (!dev) 208 if (!dev)
216 return -ENOMEM; 209 return -ENOMEM;