Commit 79b0eb2a authored by David S. Miller's avatar David S. Miller

Merge branch 'm68k-netdev-modular'

Geert Uytterhoeven says:

====================
net: m68k: Allow modular build

This patch series makes the remaining m68k Ethernet drivers modular.
It's an alternative to the last 3 patches of Paul Gortmaker's series
"[PATCH net-next 0/6] make non-modular code explicitly non-modular".

Note that "[PATCH 5/5] net: macmace: Allow modular build" depends on
"[PATCH 4/5] m68k/mac: Export Peripheral System Controller (PSC) base
address to modules". Feel free to take the dependency through the netdev
tree to avoid modular build breakage.

This was compile-tested only (mac_defconfig + allmodconfig) due to lack
of hardware.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 49052871 6153348f
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
int psc_present; int psc_present;
volatile __u8 *psc; volatile __u8 *psc;
EXPORT_SYMBOL_GPL(psc);
/* /*
* Debugging dump, used in various places to see what's going on. * Debugging dump, used in various places to see what's going on.
......
...@@ -64,7 +64,7 @@ config ARM_ETHERH ...@@ -64,7 +64,7 @@ config ARM_ETHERH
should say Y to this option if you wish to use it with Linux. should say Y to this option if you wish to use it with Linux.
config MAC8390 config MAC8390
bool "Macintosh NS 8390 based ethernet cards" tristate "Macintosh NS 8390 based ethernet cards"
depends on MAC depends on MAC
select CRC32 select CRC32
---help--- ---help---
......
...@@ -454,34 +454,22 @@ MODULE_AUTHOR("David Huggins-Daines <dhd@debian.org> and others"); ...@@ -454,34 +454,22 @@ MODULE_AUTHOR("David Huggins-Daines <dhd@debian.org> and others");
MODULE_DESCRIPTION("Macintosh NS8390-based Nubus Ethernet driver"); MODULE_DESCRIPTION("Macintosh NS8390-based Nubus Ethernet driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
/* overkill, of course */ static struct net_device *dev_mac8390;
static struct net_device *dev_mac8390[15];
int init_module(void) int __init init_module(void)
{ {
int i; dev_mac8390 = mac8390_probe(-1);
for (i = 0; i < 15; i++) { if (IS_ERR(dev_mac8390)) {
struct net_device *dev = mac8390_probe(-1); pr_warn("mac8390: No card found\n");
if (IS_ERR(dev)) return PTR_ERR(dev_mac8390);
break;
dev_mac890[i] = dev;
}
if (!i) {
pr_notice("No useable cards found, driver NOT installed.\n");
return -ENODEV;
} }
return 0; return 0;
} }
void cleanup_module(void) void __exit cleanup_module(void)
{ {
int i; unregister_netdev(dev_mac8390);
for (i = 0; i < 15; i++) { free_netdev(dev_mac8390);
struct net_device *dev = dev_mac890[i];
if (dev) {
unregister_netdev(dev);
free_netdev(dev);
}
}
} }
#endif /* MODULE */ #endif /* MODULE */
......
...@@ -661,6 +661,7 @@ void lance_poll(struct net_device *dev) ...@@ -661,6 +661,7 @@ void lance_poll(struct net_device *dev)
spin_unlock(&lp->devlock); spin_unlock(&lp->devlock);
lance_interrupt(dev->irq, dev); lance_interrupt(dev->irq, dev);
} }
EXPORT_SYMBOL_GPL(lance_poll);
#endif #endif
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -100,7 +100,7 @@ config DECLANCE ...@@ -100,7 +100,7 @@ config DECLANCE
DEPCA series. (This chipset is better known via the NE2100 cards.) DEPCA series. (This chipset is better known via the NE2100 cards.)
config HPLANCE config HPLANCE
bool "HP on-board LANCE support" tristate "HP on-board LANCE support"
depends on DIO depends on DIO
select CRC32 select CRC32
---help--- ---help---
......
...@@ -51,7 +51,7 @@ config BMAC ...@@ -51,7 +51,7 @@ config BMAC
will be called bmac. will be called bmac.
config MACMACE config MACMACE
bool "Macintosh (AV) onboard MACE ethernet" tristate "Macintosh (AV) onboard MACE ethernet"
depends on MAC depends on MAC
select CRC32 select CRC32
---help--- ---help---
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment