aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sunlance.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 30cdb81853b4..704301a5a7ff 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -1502,43 +1502,6 @@ fail:
1502 return -ENODEV; 1502 return -ENODEV;
1503} 1503}
1504 1504
1505#ifdef CONFIG_SUN4
1506
1507#include <asm/sun4paddr.h>
1508#include <asm/machines.h>
1509
1510/* Find all the lance cards on the system and initialize them */
1511static struct sbus_dev sun4_sdev;
1512static int __devinit sparc_lance_init(void)
1513{
1514 if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) ||
1515 (idprom->id_machtype == (SM_SUN4|SM_4_470))) {
1516 memset(&sun4_sdev, 0, sizeof(struct sbus_dev));
1517 sun4_sdev.reg_addrs[0].phys_addr = sun4_eth_physaddr;
1518 sun4_sdev.irqs[0] = 6;
1519 return sparc_lance_probe_one(&sun4_sdev, NULL, NULL);
1520 }
1521 return -ENODEV;
1522}
1523
1524static int __exit sunlance_sun4_remove(void)
1525{
1526 struct lance_private *lp = dev_get_drvdata(&sun4_sdev.ofdev.dev);
1527 struct net_device *net_dev = lp->dev;
1528
1529 unregister_netdev(net_dev);
1530
1531 lance_free_hwresources(lp);
1532
1533 free_netdev(net_dev);
1534
1535 dev_set_drvdata(&sun4_sdev.ofdev.dev, NULL);
1536
1537 return 0;
1538}
1539
1540#else /* !CONFIG_SUN4 */
1541
1542static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) 1505static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match)
1543{ 1506{
1544 struct of_device *parent = to_of_device(op->dev.parent); 1507 struct of_device *parent = to_of_device(op->dev.parent);
@@ -1593,15 +1556,10 @@ static int __init sparc_lance_init(void)
1593{ 1556{
1594 return of_register_driver(&sunlance_sbus_driver, &of_bus_type); 1557 return of_register_driver(&sunlance_sbus_driver, &of_bus_type);
1595} 1558}
1596#endif /* !CONFIG_SUN4 */
1597 1559
1598static void __exit sparc_lance_exit(void) 1560static void __exit sparc_lance_exit(void)
1599{ 1561{
1600#ifdef CONFIG_SUN4
1601 sunlance_sun4_remove();
1602#else
1603 of_unregister_driver(&sunlance_sbus_driver); 1562 of_unregister_driver(&sunlance_sbus_driver);
1604#endif
1605} 1563}
1606 1564
1607module_init(sparc_lance_init); 1565module_init(sparc_lance_init);