From fbfb97942e88a6800df9574ff8da019fee368aa8 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 8 May 2004 06:04:06 +0000 Subject: [PATCH] It turns out that the module dependency on pccard is in error. Since there's not dependencies on pccard symboles, such a dependency is not necessary. This means that drivers that have multiple attachments can not drag bogus devices into the kernel at load time. We can't (yet) do this with pci and isa. Drivers written for them actually do seem to have symbols that depend on these busses' implementation code. ndis not touched until other things can be tested. --- sys/dev/an/if_an_pccard.c | 1 - sys/dev/awi/if_awi_pccard.c | 1 - sys/dev/ed/if_ed_pccard.c | 1 - sys/dev/sn/if_sn_pccard.c | 1 - sys/dev/snc/if_snc_pccard.c | 1 - sys/dev/wi/if_wi_pccard.c | 1 - 6 files changed, 6 deletions(-) diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c index 2dbd48a0924..c9587c9f23a 100644 --- a/sys/dev/an/if_an_pccard.c +++ b/sys/dev/an/if_an_pccard.c @@ -105,7 +105,6 @@ static devclass_t an_pccard_devclass; DRIVER_MODULE(an, pccard, an_pccard_driver, an_pccard_devclass, 0, 0); MODULE_DEPEND(an, wlan, 1, 1, 1); -MODULE_DEPEND(an, pccard, 1, 1, 1); static const struct pccard_product an_pccard_products[] = { PCMCIA_CARD(AIRONET, PC4800, 0), diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c index 56f36a8502a..e860a5c8256 100644 --- a/sys/dev/awi/if_awi_pccard.c +++ b/sys/dev/awi/if_awi_pccard.c @@ -301,4 +301,3 @@ extern devclass_t awi_devclass; DRIVER_MODULE(awi, pccard, awi_pccard_driver, awi_devclass, 0, 0); MODULE_DEPEND(awi, wlan, 1, 1, 1); -MODULE_DEPEND(awi, pccard, 1, 1, 1); diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index fdace91f30f..927ac62b008 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -65,7 +65,6 @@ MODULE_DEPEND(ed, miibus, 1, 1, 1); #endif MODULE_DEPEND(ed, ether, 1, 1, 1); -MODULE_DEPEND(ed, pccard, 1, 1, 1); /* * PC-Card (PCMCIA) specific code. diff --git a/sys/dev/sn/if_sn_pccard.c b/sys/dev/sn/if_sn_pccard.c index 57551a8bef7..51f120d7bea 100644 --- a/sys/dev/sn/if_sn_pccard.c +++ b/sys/dev/sn/if_sn_pccard.c @@ -169,5 +169,4 @@ static driver_t sn_pccard_driver = { extern devclass_t sn_devclass; DRIVER_MODULE(sn, pccard, sn_pccard_driver, sn_devclass, 0, 0); -MODULE_DEPEND(sn, pccard, 1, 1, 1); MODULE_DEPEND(sn, ether, 1, 1, 1); diff --git a/sys/dev/snc/if_snc_pccard.c b/sys/dev/snc/if_snc_pccard.c index 0b591200b51..1478d26bd30 100644 --- a/sys/dev/snc/if_snc_pccard.c +++ b/sys/dev/snc/if_snc_pccard.c @@ -80,7 +80,6 @@ static driver_t snc_pccard_driver = { DRIVER_MODULE(snc, pccard, snc_pccard_driver, snc_devclass, 0, 0); MODULE_DEPEND(snc, ether, 1, 1, 1); -MODULE_DEPEND(snc, pccard, 1, 1, 1); /* * snc_pccard_detach - unload the driver and clear the table. diff --git a/sys/dev/wi/if_wi_pccard.c b/sys/dev/wi/if_wi_pccard.c index 09f384d52e6..d817a2fd87e 100644 --- a/sys/dev/wi/if_wi_pccard.c +++ b/sys/dev/wi/if_wi_pccard.c @@ -120,7 +120,6 @@ static driver_t wi_pccard_driver = { DRIVER_MODULE(wi, pccard, wi_pccard_driver, wi_devclass, 0, 0); MODULE_DEPEND(wi, wlan, 1, 1, 1); -MODULE_DEPEND(wi, pccard, 1, 1, 1); #if __FreeBSD_version >= 500000 static const struct pccard_product wi_pccard_products[] = {