Commit e179d78e authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

m68k: remove legacy probing



There are six m68k specific drivers that use the legacy probe method
in drivers/net/Space.c. However, all of these only support a single
device, and they completely ignore the command line settings from
netdev_boot_setup_check, so there is really no point at all.

Aside from sun3_82586, these already have a module_init function that
can be used for built-in mode as well, simply by removing the #ifdef.

Note that the 82596 driver was previously used on ISA as well, but
that got dropped long ago.

Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 47fd22f2
Loading
Loading
Loading
Loading
+1 −24
Original line number Diff line number Diff line
@@ -80,34 +80,12 @@ static struct devprobe2 isa_probes[] __initdata = {
#ifdef CONFIG_CS89x0_ISA
	{cs89x0_probe, 0},
#endif
#if defined(CONFIG_MVME16x_NET) || defined(CONFIG_BVME6000_NET)	/* Intel */
	{i82596_probe, 0},					/* I82596 */
#endif
#ifdef CONFIG_NI65
	{ni65_probe, 0},
#endif
	{NULL, 0},
};

static struct devprobe2 m68k_probes[] __initdata = {
#ifdef CONFIG_ATARILANCE	/* Lance-based Atari ethernet boards */
	{atarilance_probe, 0},
#endif
#ifdef CONFIG_SUN3LANCE         /* sun3 onboard Lance chip */
	{sun3lance_probe, 0},
#endif
#ifdef CONFIG_SUN3_82586        /* sun3 onboard Intel 82586 chip */
	{sun3_82586_probe, 0},
#endif
#ifdef CONFIG_APNE		/* A1200 PCMCIA NE2000 */
	{apne_probe, 0},
#endif
#ifdef CONFIG_MVME147_NET	/* MVME147 internal Ethernet */
	{mvme147lance_probe, 0},
#endif
	{NULL, 0},
};

/* Unified ethernet device probe, segmented per architecture and
 * per bus interface. This drives the legacy devices only for now.
 */
@@ -119,8 +97,7 @@ static void __init ethif_probe2(int unit)
	if (base_addr == 1)
		return;

	(void)(probe_list2(unit, m68k_probes, base_addr == 0) &&
		probe_list2(unit, isa_probes, base_addr == 0));
	probe_list2(unit, isa_probes, base_addr == 0);
}

/*  Statically configured drivers -- order matters here. */
+2 −9
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@
#define NESM_STOP_PG	0x80	/* Last page +1 of RX ring */


struct net_device * __init apne_probe(int unit);
static int apne_probe1(struct net_device *dev, int ioaddr);

static void apne_reset_8390(struct net_device *dev);
@@ -120,7 +119,7 @@ static u32 apne_msg_enable;
module_param_named(msg_enable, apne_msg_enable, uint, 0444);
MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)");

struct net_device * __init apne_probe(int unit)
static struct net_device * __init apne_probe(void)
{
	struct net_device *dev;
	struct ei_device *ei_local;
@@ -150,10 +149,6 @@ struct net_device * __init apne_probe(int unit)
	dev = alloc_ei_netdev();
	if (!dev)
		return ERR_PTR(-ENOMEM);
	if (unit >= 0) {
		sprintf(dev->name, "eth%d", unit);
		netdev_boot_setup_check(dev);
	}
	ei_local = netdev_priv(dev);
	ei_local->msg_enable = apne_msg_enable;

@@ -554,12 +549,11 @@ static irqreturn_t apne_interrupt(int irq, void *dev_id)
    return IRQ_HANDLED;
}

#ifdef MODULE
static struct net_device *apne_dev;

static int __init apne_module_init(void)
{
	apne_dev = apne_probe(-1);
	apne_dev = apne_probe();
	return PTR_ERR_OR_ZERO(apne_dev);
}

@@ -579,7 +573,6 @@ static void __exit apne_module_exit(void)
}
module_init(apne_module_init);
module_exit(apne_module_exit);
#endif

static int init_pcmcia(void)
{
+2 −9
Original line number Diff line number Diff line
@@ -367,7 +367,7 @@ static void *slow_memcpy( void *dst, const void *src, size_t len )
}


struct net_device * __init atarilance_probe(int unit)
struct net_device * __init atarilance_probe(void)
{
	int i;
	static int found;
@@ -382,10 +382,6 @@ struct net_device * __init atarilance_probe(int unit)
	dev = alloc_etherdev(sizeof(struct lance_private));
	if (!dev)
		return ERR_PTR(-ENOMEM);
	if (unit >= 0) {
		sprintf(dev->name, "eth%d", unit);
		netdev_boot_setup_check(dev);
	}

	for( i = 0; i < N_LANCE_ADDR; ++i ) {
		if (lance_probe1( dev, &lance_addr_list[i] )) {
@@ -1137,13 +1133,11 @@ static int lance_set_mac_address( struct net_device *dev, void *addr )
	return 0;
}


#ifdef MODULE
static struct net_device *atarilance_dev;

static int __init atarilance_module_init(void)
{
	atarilance_dev = atarilance_probe(-1);
	atarilance_dev = atarilance_probe();
	return PTR_ERR_OR_ZERO(atarilance_dev);
}

@@ -1155,4 +1149,3 @@ static void __exit atarilance_module_exit(void)
}
module_init(atarilance_module_init);
module_exit(atarilance_module_exit);
#endif /* MODULE */
+6 −10
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ static const struct net_device_ops lance_netdev_ops = {
};

/* Initialise the one and only on-board 7990 */
struct net_device * __init mvme147lance_probe(int unit)
static struct net_device * __init mvme147lance_probe(void)
{
	struct net_device *dev;
	static int called;
@@ -86,9 +86,6 @@ struct net_device * __init mvme147lance_probe(int unit)
	if (!dev)
		return ERR_PTR(-ENOMEM);

	if (unit >= 0)
		sprintf(dev->name, "eth%d", unit);

	/* Fill the dev fields */
	dev->base_addr = (unsigned long)MVME147_LANCE_BASE;
	dev->netdev_ops = &lance_netdev_ops;
@@ -179,22 +176,21 @@ static int m147lance_close(struct net_device *dev)
	return 0;
}

#ifdef MODULE
MODULE_LICENSE("GPL");

static struct net_device *dev_mvme147_lance;
int __init init_module(void)
static int __init m147lance_init(void)
{
	dev_mvme147_lance = mvme147lance_probe(-1);
	dev_mvme147_lance = mvme147lance_probe();
	return PTR_ERR_OR_ZERO(dev_mvme147_lance);
}
module_init(m147lance_init);

void __exit cleanup_module(void)
static void __exit m147lance_exit(void)
{
	struct m147lance_private *lp = netdev_priv(dev_mvme147_lance);
	unregister_netdev(dev_mvme147_lance);
	free_pages(lp->ram, 3);
	free_netdev(dev_mvme147_lance);
}

#endif /* MODULE */
module_exit(m147lance_exit);
+6 −13
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ static void set_multicast_list( struct net_device *dev );

/************************* End of Prototypes **************************/

struct net_device * __init sun3lance_probe(int unit)
static struct net_device * __init sun3lance_probe(void)
{
	struct net_device *dev;
	static int found;
@@ -272,10 +272,6 @@ struct net_device * __init sun3lance_probe(int unit)
	dev = alloc_etherdev(sizeof(struct lance_private));
	if (!dev)
		return ERR_PTR(-ENOMEM);
	if (unit >= 0) {
		sprintf(dev->name, "eth%d", unit);
		netdev_boot_setup_check(dev);
	}

	if (!lance_probe(dev))
		goto out;
@@ -924,17 +920,16 @@ static void set_multicast_list( struct net_device *dev )
}


#ifdef MODULE

static struct net_device *sun3lance_dev;

int __init init_module(void)
static int __init sun3lance_init(void)
{
	sun3lance_dev = sun3lance_probe(-1);
	sun3lance_dev = sun3lance_probe();
	return PTR_ERR_OR_ZERO(sun3lance_dev);
}
module_init(sun3lance_init);

void __exit cleanup_module(void)
static void __exit sun3lance_cleanup(void)
{
	unregister_netdev(sun3lance_dev);
#ifdef CONFIG_SUN3
@@ -942,6 +937,4 @@ void __exit cleanup_module(void)
#endif
	free_netdev(sun3lance_dev);
}

#endif /* MODULE */
module_exit(sun3lance_cleanup);
Loading