From 2e31e339d14cb2dbcd32c3747ee7589160cd60cf Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 27 May 2004 03:49:45 +0000 Subject: [PATCH] Fix disordering of pccarddevs.h noticed by bde. Also remove a few redundant includes and fix some of the include disordering. Submitted by: bde --- sys/dev/aic/aic_pccard.c | 2 +- sys/dev/an/if_an_pccard.c | 9 +++++---- sys/dev/ata/ata-card.c | 3 ++- sys/dev/awi/if_awi_pccard.c | 3 ++- sys/dev/cs/if_cs_pccard.c | 2 +- sys/dev/ed/if_ed_pccard.c | 4 +++- sys/dev/ep/if_ep_pccard.c | 2 +- sys/dev/ex/if_ex_pccard.c | 2 +- sys/dev/fe/if_fe_pccard.c | 4 ++-- sys/dev/joy/joy_pccard.c | 2 +- sys/dev/ncv/ncr53c500_pccard.c | 17 +++++++---------- sys/dev/nsp/nsp_pccard.c | 19 +++++++------------ sys/dev/sio/sio_pccard.c | 4 ++-- sys/dev/sn/if_sn_pccard.c | 13 ++++--------- sys/dev/stg/tmc18c30_pccard.c | 15 +++++---------- sys/dev/uart/uart_bus_pccard.c | 4 ++-- sys/dev/wi/if_wi_pccard.c | 22 +--------------------- sys/dev/xe/if_xe_pccard.c | 9 ++++----- 18 files changed, 51 insertions(+), 85 deletions(-) diff --git a/sys/dev/aic/aic_pccard.c b/sys/dev/aic/aic_pccard.c index 54d937ec67ad..55831508a966 100644 --- a/sys/dev/aic/aic_pccard.c +++ b/sys/dev/aic/aic_pccard.c @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pccarddevs.h" #include "card_if.h" +#include "pccarddevs.h" struct aic_pccard_softc { struct aic_softc sc_aic; diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c index ad9c6f4bf14d..7b22eace94ad 100644 --- a/sys/dev/an/if_an_pccard.c +++ b/sys/dev/an/if_an_pccard.c @@ -66,13 +66,14 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include "pccarddevs.h" -#include "card_if.h" - #include #include +#include + +#include "pccarddevs.h" +#include "card_if.h" + /* * Support for PCMCIA cards. */ diff --git a/sys/dev/ata/ata-card.c b/sys/dev/ata/ata-card.c index 315b844e200e..118c8183f009 100644 --- a/sys/dev/ata/ata-card.c +++ b/sys/dev/ata/ata-card.c @@ -45,10 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include "pccarddevs.h" #include #include +#include "pccarddevs.h" + static const struct pccard_product ata_pccard_products[] = { PCMCIA_CARD(FREECOM, PCCARDIDE, 0), PCMCIA_CARD(EXP, EXPMULTIMEDIA, 0), diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c index 770e3b4ef1b0..683790a5cb80 100644 --- a/sys/dev/awi/if_awi_pccard.c +++ b/sys/dev/awi/if_awi_pccard.c @@ -51,8 +51,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pccarddevs.h" + #include "card_if.h" +#include "pccarddevs.h" struct awi_pccard_softc { struct awi_softc sc_awi; diff --git a/sys/dev/cs/if_cs_pccard.c b/sys/dev/cs/if_cs_pccard.c index 69750e0ec59a..721a49a9de91 100644 --- a/sys/dev/cs/if_cs_pccard.c +++ b/sys/dev/cs/if_cs_pccard.c @@ -45,9 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include "pccarddevs.h" #include "card_if.h" +#include "pccarddevs.h" static const struct pccard_product cs_pccard_products[] = { PCMCIA_CARD(IBM, ETHERJET, 0), diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index 79e1d9758d54..3770c89a1e76 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -51,7 +51,6 @@ #include #include #include -#include "pccarddevs.h" #ifndef ED_NO_MIIBUS #include #include @@ -61,7 +60,10 @@ #ifndef ED_NO_MIIBUS /* "device miibus" required. See GENERIC if you get errors here. */ #include "miibus_if.h" +#endif +#include "pccarddevs.h" +#ifndef ED_NO_MIIBUS MODULE_DEPEND(ed, miibus, 1, 1, 1); #endif MODULE_DEPEND(ed, ether, 1, 1, 1); diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c index 21225488986d..021b504e1761 100644 --- a/sys/dev/ep/if_ep_pccard.c +++ b/sys/dev/ep/if_ep_pccard.c @@ -56,9 +56,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pccarddevs.h" #include "card_if.h" +#include "pccarddevs.h" static const char *ep_pccard_identify(u_short id); diff --git a/sys/dev/ex/if_ex_pccard.c b/sys/dev/ex/if_ex_pccard.c index 241a97ff81b5..eb5472f14cc2 100644 --- a/sys/dev/ex/if_ex_pccard.c +++ b/sys/dev/ex/if_ex_pccard.c @@ -44,11 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include - #include #include #include + #include "pccarddevs.h" static const struct pccard_product ex_pccard_products[] = { diff --git a/sys/dev/fe/if_fe_pccard.c b/sys/dev/fe/if_fe_pccard.c index ce5f580afd96..49266deeacea 100644 --- a/sys/dev/fe/if_fe_pccard.c +++ b/sys/dev/fe/if_fe_pccard.c @@ -47,9 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pccarddevs.h" + #include "card_if.h" -#include +#include "pccarddevs.h" /* * PC-Card (PCMCIA) specific code. diff --git a/sys/dev/joy/joy_pccard.c b/sys/dev/joy/joy_pccard.c index 40151f5a90d5..d94819a8c4c2 100644 --- a/sys/dev/joy/joy_pccard.c +++ b/sys/dev/joy/joy_pccard.c @@ -40,8 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include + #include "pccarddevs.h" static int diff --git a/sys/dev/ncv/ncr53c500_pccard.c b/sys/dev/ncv/ncr53c500_pccard.c index 627f1aab89cc..1e97372aa263 100644 --- a/sys/dev/ncv/ncr53c500_pccard.c +++ b/sys/dev/ncv/ncr53c500_pccard.c @@ -40,17 +40,19 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include +#include +#include #include #include +#include +#include #include #include -#include "pccarddevs.h" #include #include @@ -63,13 +65,8 @@ __FBSDID("$FreeBSD$"); #define KME_KXLC004_01 0x100 #define OFFSET_KME_KXLC004_01 0x10 -#include -#include -#if !defined(__FreeBSD__) || __FreeBSD_version < 500014 -#include -#endif -#include -#include + +#include "pccarddevs.h" static int ncvprobe(DEVPORT_PDEVICE devi); static int ncvattach(DEVPORT_PDEVICE devi); diff --git a/sys/dev/nsp/nsp_pccard.c b/sys/dev/nsp/nsp_pccard.c index 38af6f484dde..4c61b07d122d 100644 --- a/sys/dev/nsp/nsp_pccard.c +++ b/sys/dev/nsp/nsp_pccard.c @@ -38,18 +38,19 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include #include - -#include +#include +#include +#include #include +#include +#include #include #include -#include "pccarddevs.h" #include #include @@ -60,13 +61,7 @@ __FBSDID("$FreeBSD$"); #define NSP_HOSTID 7 -#include -#include -#if !defined(__FreeBSD__) || __FreeBSD_version < 500014 -#include -#endif -#include -#include +#include "pccarddevs.h" #define PIO_MODE 0x100 /* pd_flags */ diff --git a/sys/dev/sio/sio_pccard.c b/sys/dev/sio/sio_pccard.c index a6660738ca46..cafb143eddd7 100644 --- a/sys/dev/sio/sio_pccard.c +++ b/sys/dev/sio/sio_pccard.c @@ -41,12 +41,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pccarddevs.h" -#include #include #include +#include "pccarddevs.h" + static int sio_pccard_attach(device_t dev); static int sio_pccard_match(device_t self); static int sio_pccard_probe(device_t dev); diff --git a/sys/dev/sn/if_sn_pccard.c b/sys/dev/sn/if_sn_pccard.c index 0122a2d6ae2c..3b0409e25301 100644 --- a/sys/dev/sn/if_sn_pccard.c +++ b/sys/dev/sn/if_sn_pccard.c @@ -33,25 +33,20 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include #include +#include -#include -#include - -#include -#include - #include #include #include -#include #include -#include "pccarddevs.h" +#include #include "card_if.h" +#include "pccarddevs.h" static const struct pccard_product sn_pccard_products[] = { PCMCIA_CARD(DSPSI, XJACK, 0), diff --git a/sys/dev/stg/tmc18c30_pccard.c b/sys/dev/stg/tmc18c30_pccard.c index 984f33a5162f..0ea2df0f91b1 100644 --- a/sys/dev/stg/tmc18c30_pccard.c +++ b/sys/dev/stg/tmc18c30_pccard.c @@ -42,9 +42,11 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include +#include +#include +#include #include #include @@ -52,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include -#include "pccarddevs.h" #include #include @@ -62,13 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#if !defined(__FreeBSD__) || __FreeBSD_version < 500014 -#include -#endif -#include -#include +#include "pccarddevs.h" static const struct pccard_product stg_products[] = { PCMCIA_CARD(FUTUREDOMAIN, SCSI2GO, 0), diff --git a/sys/dev/uart/uart_bus_pccard.c b/sys/dev/uart/uart_bus_pccard.c index 796b2881c7f8..5f0e02b26bab 100644 --- a/sys/dev/uart/uart_bus_pccard.c +++ b/sys/dev/uart/uart_bus_pccard.c @@ -36,13 +36,13 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pccarddevs.h" -#include #include #include #include +#include "pccarddevs.h" + static int uart_pccard_match(device_t self); static int uart_pccard_probe(device_t dev); diff --git a/sys/dev/wi/if_wi_pccard.c b/sys/dev/wi/if_wi_pccard.c index 941e76a978a0..e1f70be01d60 100644 --- a/sys/dev/wi/if_wi_pccard.c +++ b/sys/dev/wi/if_wi_pccard.c @@ -65,9 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if __FreeBSD_version >= 500000 -#include "pccarddevs.h" -#endif #include #include @@ -77,22 +74,11 @@ __FBSDID("$FreeBSD$"); #endif #include "card_if.h" +#include "pccarddevs.h" static int wi_pccard_probe(device_t); static int wi_pccard_attach(device_t); -#if __FreeBSD_version < 500000 -static device_method_t wi_pccard_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, wi_pccard_probe), - DEVMETHOD(device_attach, wi_pccard_attach), - DEVMETHOD(device_detach, wi_detach), - DEVMETHOD(device_shutdown, wi_shutdown), - - { 0, 0 } -}; - -#else static int wi_pccard_match(device_t); static device_method_t wi_pccard_methods[] = { @@ -110,8 +96,6 @@ static device_method_t wi_pccard_methods[] = { { 0, 0 } }; -#endif - static driver_t wi_pccard_driver = { "wi", wi_pccard_methods, @@ -121,7 +105,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); -#if __FreeBSD_version >= 500000 static const struct pccard_product wi_pccard_products[] = { PCMCIA_CARD(3COM, 3CRWE737A, 0), PCMCIA_CARD(3COM, 3CRWE777A, 0), @@ -188,7 +171,6 @@ wi_pccard_match(dev) } return (ENXIO); } -#endif static int wi_pccard_probe(dev) @@ -231,7 +213,6 @@ wi_pccard_attach(device_t dev) return (error); } -#if __FreeBSD_version > 500000 /* * The cute little Symbol LA4100-series CF cards need to have * code downloaded to them. @@ -253,7 +234,6 @@ wi_pccard_attach(device_t dev) return (ENXIO); #endif } -#endif retval = wi_attach(dev); if (retval != 0) wi_free(dev); diff --git a/sys/dev/xe/if_xe_pccard.c b/sys/dev/xe/if_xe_pccard.c index cb71f94e2631..1425bb9d6e5f 100644 --- a/sys/dev/xe/if_xe_pccard.c +++ b/sys/dev/xe/if_xe_pccard.c @@ -30,12 +30,10 @@ __FBSDID("$FreeBSD$"); /* xe pccard interface driver */ #include -#include +#include #include #include - -#include -#include +#include #include #include @@ -52,9 +50,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pccarddevs.h" #include + #include "card_if.h" +#include "pccarddevs.h" /* * Debug logging levels - set with hw.xe.debug sysctl