Skip to content

Commit 79b0eb2

Browse files
committed
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: David S. Miller <[email protected]>
2 parents 4905287 + 6153348 commit 79b0eb2

File tree

6 files changed

+15
-25
lines changed

6 files changed

+15
-25
lines changed

arch/m68k/mac/psc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
int psc_present;
3131
volatile __u8 *psc;
32+
EXPORT_SYMBOL_GPL(psc);
3233

3334
/*
3435
* Debugging dump, used in various places to see what's going on.

drivers/net/ethernet/8390/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ config ARM_ETHERH
6464
should say Y to this option if you wish to use it with Linux.
6565

6666
config MAC8390
67-
bool "Macintosh NS 8390 based ethernet cards"
67+
tristate "Macintosh NS 8390 based ethernet cards"
6868
depends on MAC
6969
select CRC32
7070
---help---

drivers/net/ethernet/8390/mac8390.c

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -454,34 +454,22 @@ MODULE_AUTHOR("David Huggins-Daines <[email protected]> and others");
454454
MODULE_DESCRIPTION("Macintosh NS8390-based Nubus Ethernet driver");
455455
MODULE_LICENSE("GPL");
456456

457-
/* overkill, of course */
458-
static struct net_device *dev_mac8390[15];
459-
int init_module(void)
457+
static struct net_device *dev_mac8390;
458+
459+
int __init init_module(void)
460460
{
461-
int i;
462-
for (i = 0; i < 15; i++) {
463-
struct net_device *dev = mac8390_probe(-1);
464-
if (IS_ERR(dev))
465-
break;
466-
dev_mac890[i] = dev;
467-
}
468-
if (!i) {
469-
pr_notice("No useable cards found, driver NOT installed.\n");
470-
return -ENODEV;
461+
dev_mac8390 = mac8390_probe(-1);
462+
if (IS_ERR(dev_mac8390)) {
463+
pr_warn("mac8390: No card found\n");
464+
return PTR_ERR(dev_mac8390);
471465
}
472466
return 0;
473467
}
474468

475-
void cleanup_module(void)
469+
void __exit cleanup_module(void)
476470
{
477-
int i;
478-
for (i = 0; i < 15; i++) {
479-
struct net_device *dev = dev_mac890[i];
480-
if (dev) {
481-
unregister_netdev(dev);
482-
free_netdev(dev);
483-
}
484-
}
471+
unregister_netdev(dev_mac8390);
472+
free_netdev(dev_mac8390);
485473
}
486474

487475
#endif /* MODULE */

drivers/net/ethernet/amd/7990.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ void lance_poll(struct net_device *dev)
661661
spin_unlock(&lp->devlock);
662662
lance_interrupt(dev->irq, dev);
663663
}
664+
EXPORT_SYMBOL_GPL(lance_poll);
664665
#endif
665666

666667
MODULE_LICENSE("GPL");

drivers/net/ethernet/amd/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ config DECLANCE
100100
DEPCA series. (This chipset is better known via the NE2100 cards.)
101101

102102
config HPLANCE
103-
bool "HP on-board LANCE support"
103+
tristate "HP on-board LANCE support"
104104
depends on DIO
105105
select CRC32
106106
---help---

drivers/net/ethernet/apple/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ config BMAC
5151
will be called bmac.
5252

5353
config MACMACE
54-
bool "Macintosh (AV) onboard MACE ethernet"
54+
tristate "Macintosh (AV) onboard MACE ethernet"
5555
depends on MAC
5656
select CRC32
5757
---help---

0 commit comments

Comments
 (0)