diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/asr/dptsig.h | 4 | ||||
-rw-r--r-- | sys/dev/bktr/bktr_card.c | 4 | ||||
-rw-r--r-- | sys/dev/bktr/bktr_core.c | 2 | ||||
-rw-r--r-- | sys/dev/esp/ncr53c9x.c | 2 | ||||
-rw-r--r-- | sys/dev/esp/ncr53c9xvar.h | 4 | ||||
-rw-r--r-- | sys/dev/fb/fb.c | 6 | ||||
-rw-r--r-- | sys/dev/lmc/if_lmc.c | 118 | ||||
-rw-r--r-- | sys/dev/my/if_my.c | 2 | ||||
-rw-r--r-- | sys/dev/rp/rp.c | 2 | ||||
-rw-r--r-- | sys/dev/rp/rp_isa.c | 2 | ||||
-rw-r--r-- | sys/dev/rp/rp_pci.c | 4 | ||||
-rw-r--r-- | sys/dev/rp/rpvar.h | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/csa.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/if_udav.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_udavreg.h | 2 | ||||
-rw-r--r-- | sys/dev/usb/sl811hs.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uplcom.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uvscom.c | 4 |
18 files changed, 91 insertions, 89 deletions
diff --git a/sys/dev/asr/dptsig.h b/sys/dev/asr/dptsig.h index a70ad11..e7b6d7d 100644 --- a/sys/dev/asr/dptsig.h +++ b/sys/dev/asr/dptsig.h @@ -76,7 +76,7 @@ typedef unsigned long sigLONG; #endif /* aix */ #endif /* For the Macintosh */ -#if STRUCTALIGNMENTSUPPORTED +#ifdef STRUCTALIGNMENTSUPPORTED #pragma options align=mac68k #endif @@ -458,7 +458,7 @@ typedef struct dpt_sig_Packed { #endif /* aix */ #endif /* For the Macintosh */ -#if STRUCTALIGNMENTSUPPORTED +#ifdef STRUCTALIGNMENTSUPPORTED #pragma options align=reset #endif diff --git a/sys/dev/bktr/bktr_card.c b/sys/dev/bktr/bktr_card.c index 8882b8b..00526de 100644 --- a/sys/dev/bktr/bktr_card.c +++ b/sys/dev/bktr/bktr_card.c @@ -120,7 +120,7 @@ __FBSDID("$FreeBSD$"); #define PFC8582_WADDR 0xa0 #define PFC8582_RADDR 0xa1 -#if BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL +#if defined(BKTR_SYSTEM_DEFAULT) && BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL #define DEFAULT_TUNER PHILIPS_PALI #else #define DEFAULT_TUNER PHILIPS_NTSC @@ -1196,7 +1196,7 @@ checkTuner: break; case CARD_LEADTEK: -#if BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL +#if defined(BKTR_SYSTEM_DEFAULT) && BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL select_tuner( bktr, PHILIPS_FR1216_PAL ); #else select_tuner( bktr, PHILIPS_FR1236_NTSC ); diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c index 41f0b09..9792418 100644 --- a/sys/dev/bktr/bktr_core.c +++ b/sys/dev/bktr/bktr_core.c @@ -981,7 +981,7 @@ video_open( bktr_ptr_t bktr ) OUTB(bktr, BKTR_ADC, SYNC_LEVEL); -#if BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL +#if defined(BKTR_SYSTEM_DEFAULT) && BKTR_SYSTEM_DEFAULT == BROOKTREE_PAL video_format = 0; #else video_format = 1; diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c index 010e9c6..c9ac5e8 100644 --- a/sys/dev/esp/ncr53c9x.c +++ b/sys/dev/esp/ncr53c9x.c @@ -2958,7 +2958,7 @@ ncr53c9x_timeout(void *arg) sc->sc_phase, sc->sc_prevphase, (long)sc->sc_dleft, sc->sc_msgpriq, sc->sc_msgout, NCRDMA_ISACTIVE(sc) ? "DMA active" : ""); -#if NCR53C9X_DEBUG > 1 +#if defined(NCR53C9X_DEBUG) && NCR53C9X_DEBUG > 1 printf("TRACE: %s.", ecb->trace); #endif diff --git a/sys/dev/esp/ncr53c9xvar.h b/sys/dev/esp/ncr53c9xvar.h index 79afcee..c9ac4bb 100644 --- a/sys/dev/esp/ncr53c9xvar.h +++ b/sys/dev/esp/ncr53c9xvar.h @@ -142,11 +142,11 @@ struct ncr53c9x_ecb { u_char tag[2]; /* TAG bytes */ u_char pad[1]; -#if NCR53C9X_DEBUG > 1 +#if defined(NCR53C9X_DEBUG) && NCR53C9X_DEBUG > 1 char trace[1000]; #endif }; -#if NCR53C9X_DEBUG > 1 +#if defined(NCR53C9X_DEBUG) && NCR53C9X_DEBUG > 1 #define ECB_TRACE(ecb, msg, a, b) do { \ const char *f = "[" msg "]"; \ int n = strlen((ecb)->trace); \ diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index 0878feb..ea9c996 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -304,7 +304,7 @@ vid_configure(int flags) #ifdef FB_INSTALL_CDEV -#if experimental +#if 0 /* experimental */ static devclass_t fb_devclass; @@ -348,12 +348,12 @@ fbattach(device_t dev) return 0; } -#endif /* experimental */ +#endif #define FB_UNIT(dev) minor(dev) #define FB_MKMINOR(unit) (u) -#if experimental +#if 0 /* experimental */ static d_open_t fbopen; static d_close_t fbclose; static d_read_t fbread; diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c index 2f2b358..e4dfdfe 100644 --- a/sys/dev/lmc/if_lmc.c +++ b/sys/dev/lmc/if_lmc.c @@ -71,7 +71,7 @@ * * Send bug reports and improvements to <boggs@boggs.palo-alto.ca.us>. */ -#if __FreeBSD__ +#ifdef __FreeBSD__ # include <sys/param.h> /* OS version */ # define IFNET 1 # include "opt_inet.h" /* INET */ @@ -139,7 +139,7 @@ # include <dev/lmc/if_lmc.h> #endif /*__FreeBSD__*/ -#if __NetBSD__ +#ifdef __NetBSD__ # include <sys/param.h> /* OS version */ # define IFNET 1 # include "opt_inet.h" /* INET6, INET */ @@ -188,7 +188,7 @@ # include "if_lmc.h" #endif /*__NetBSD__*/ -#if __OpenBSD__ +#ifdef __OpenBSD__ # include <sys/param.h> /* OS version */ # define IFNET 1 /* -DINET is passed on the compiler command line */ @@ -236,7 +236,7 @@ # include "if_lmc.h" #endif /*__OpenBSD__*/ -#if __bsdi__ +#ifdef __bsdi__ # include <sys/param.h> /* OS version */ # define IFNET 1 /* -DINET is passed on the compiler command line */ @@ -286,7 +286,7 @@ # include "if_lmc.h" #endif /*__bsdi__*/ -#if __linux__ +#ifdef __linux__ # include <linux/config.h> # if (CONFIG_HDLC || CONFIG_HDLC_MODULE) # define GEN_HDLC 1 @@ -2477,8 +2477,8 @@ struct card t1_card = #if IFNET -# if ((__FreeBSD__ && (__FreeBSD_version < 500000)) ||\ - __NetBSD__ || __OpenBSD__ || __bsdi__) +# if ((defined(__FreeBSD__) && (__FreeBSD_version < 500000)) ||\ + defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)) static void netisr_dispatch(int isr, struct mbuf *mbuf) { @@ -2580,7 +2580,7 @@ mbuf_dequeue(struct desc_ring *ring) return m; } -# if __FreeBSD__ +# ifdef __FreeBSD__ static void /* *** FreeBSD ONLY *** Callout from bus_dmamap_load() */ fbsd_dmamap_load(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { @@ -2607,7 +2607,7 @@ create_ring(softc_t *sc, struct desc_ring *ring, int num_descs) return EINVAL; } -#if __FreeBSD__ +#ifdef __FreeBSD__ /* Create a DMA tag for descriptors and buffers. */ if ((error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, @@ -2648,7 +2648,7 @@ create_ring(softc_t *sc, struct desc_ring *ring, int num_descs) return error; } -#elif (__NetBSD__ || __OpenBSD__) +#elif (defined(__NetBSD__) || defined(__OpenBSD__)) /* Use the DMA tag passed to attach() for descriptors and buffers. */ ring->tag = sc->pa_dmat; @@ -2697,7 +2697,7 @@ create_ring(softc_t *sc, struct desc_ring *ring, int num_descs) return error; } -#elif __bsdi__ +#elif defined(__bsdi__) /* Allocate wired physical memory for DMA descriptor array. */ if ((ring->first = malloc(size_descs, M_DEVBUF, M_NOWAIT)) == NULL) @@ -2751,7 +2751,7 @@ destroy_ring(softc_t *sc, struct desc_ring *ring) if (ring->read++ == ring->last) ring->read = ring->first; } -#if __FreeBSD__ +#ifdef __FreeBSD__ /* Free the dmamaps of all DMA descriptors. */ for (desc=ring->first; desc!=ring->last+1; desc++) @@ -2768,7 +2768,7 @@ destroy_ring(softc_t *sc, struct desc_ring *ring) if (ring->tag != NULL) bus_dma_tag_destroy(ring->tag); -#elif (__NetBSD__ || __OpenBSD__) +#elif (defined(__NetBSD__) || defined(__OpenBSD__)) /* Free the dmamaps of all DMA descriptors. */ for (desc=ring->first; desc!=ring->last+1; desc++) @@ -2788,7 +2788,7 @@ destroy_ring(softc_t *sc, struct desc_ring *ring) if (ring->segs[0].ds_addr != 0) bus_dmamem_free(ring->tag, ring->segs, ring->nsegs); -#elif __bsdi__ +#elif defined(__bsdi__) /* Free kernel memory for DMA descriptor array. */ if (ring->first != NULL) @@ -2807,7 +2807,7 @@ rxintr_cleanup(softc_t *sc) struct mbuf *new_mbuf; int pkt_len, desc_len; -#if (__FreeBSD__ && DEVICE_POLLING) +#if (defined(__FreeBSD__) && DEVICE_POLLING) /* Input packet flow control (livelock prevention): */ /* Give pkts to higher levels only if quota is > 0. */ if (sc->quota <= 0) return 0; @@ -2923,7 +2923,7 @@ rxintr_cleanup(softc_t *sc) sc->ifp->if_ipackets++; LMC_BPF_MTAP(first_mbuf); #endif -#if (__FreeBSD__ && DEVICE_POLLING) +#if (defined(__FreeBSD__) && DEVICE_POLLING) sc->quota--; #endif @@ -3039,11 +3039,11 @@ rxintr_setup(softc_t *sc) DMA_SYNC(desc->map, desc_len, BUS_DMASYNC_PREREAD); /* Set up the DMA descriptor. */ -#if __FreeBSD__ +#ifdef __FreeBSD__ desc->address1 = ring->segs[0].ds_addr; -#elif (__NetBSD__ || __OpenBSD__) +#elif (defined(__NetBSD__) || defined(__OpenBSD__)) desc->address1 = desc->map->dm_segs[0].ds_addr; -#elif __bsdi__ +#elif defined(__bsdi__) desc->address1 = vtophys(m->m_data); /* Relax! BSD/OS only. */ #endif desc->length1 = desc_len>>1; @@ -3167,12 +3167,12 @@ txintr_setup_mbuf(softc_t *sc, struct mbuf *m) /* Prevent wild fetches if mapping fails (nsegs==0). */ desc->length1 = desc->length2 = 0; desc->address1 = desc->address2 = 0; -#if (__FreeBSD__ || __NetBSD__ || __OpenBSD__) +#if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) { -# if __FreeBSD__ +# ifdef __FreeBSD__ bus_dma_segment_t *segs = ring->segs; int nsegs = ring->nsegs; -# elif (__NetBSD__ || __OpenBSD__) +# elif (defined(__NetBSD__) || defined(__OpenBSD__)) bus_dma_segment_t *segs = desc->map->dm_segs; int nsegs = desc->map->dm_nsegs; # endif @@ -3187,7 +3187,7 @@ txintr_setup_mbuf(softc_t *sc, struct mbuf *m) desc->length2 = segs[1].ds_len; } } -#elif __bsdi__ +#elif defined(__bsdi__) desc->address1 = vtophys(data); /* Relax! BSD/OS only. */ desc->length1 = desc_len; #endif @@ -3284,7 +3284,7 @@ txintr_setup(softc_t *sc) #endif /* BSD */ -#if __linux__ +#ifdef __linux__ /* NOTE: this is the LINUX version of the interrupt/DMA code, */ /* Singly-linked tail-queues hold sk_buffs with active DMA. @@ -3947,7 +3947,7 @@ user_interrupt(softc_t *sc, int check_status) #if BSD -# if (__FreeBSD__ && DEVICE_POLLING) +# if (defined(__FreeBSD__) && DEVICE_POLLING) /* Service the card from the kernel idle loop without interrupts. */ static void @@ -3986,7 +3986,7 @@ bsd_interrupt(void *arg) if ((READ_CSR(TLP_STATUS) & TLP_INT_TXRX) == 0) return IRQ_NONE; -# if (__FreeBSD__ && DEVICE_POLLING) +# if (defined(__FreeBSD__) && DEVICE_POLLING) if (sc->ifp->if_capenable & IFCAP_POLLING) return IRQ_NONE; @@ -4066,10 +4066,10 @@ p2p_mdmctl(struct p2pcom *p2p, int flag) static void sppp_tls(struct sppp *sppp) { -# if __FreeBSD__ +# ifdef __FreeBSD__ if (!(sppp->pp_mode & IFF_LINK2) && !(sppp->pp_flags & PP_FR)) -# elif __NetBSD__ || __OpenBSD__ +# elif defined(__NetBSD__) || defined(__OpenBSD__) if (!(sppp->pp_flags & PP_CISCO)) # endif sppp->pp_up(sppp); @@ -4079,10 +4079,10 @@ sppp_tls(struct sppp *sppp) static void sppp_tlf(struct sppp *sppp) { -# if __FreeBSD__ +# ifdef __FreeBSD__ if (!(sppp->pp_mode & IFF_LINK2) && !(sppp->pp_flags & PP_FR)) -# elif __NetBSD__ || __OpenBSD__ +# elif defined(__NetBSD__) || defined(__OpenBSD__) if (!(sppp->pp_flags & PP_CISCO)) # endif sppp->pp_down(sppp); @@ -4178,9 +4178,9 @@ config_proto(softc_t *sc, struct config *config) (config->line_prot == PROT_PPP)) { LMC_BPF_DETACH; -# if (__NetBSD__ || __OpenBSD__) +# if (defined(__NetBSD__) || defined(__OpenBSD__)) sc->sppp->pp_flags &= ~PP_CISCO; -# elif __FreeBSD__ +# elif defined(__FreeBSD__) sc->ifp->if_flags &= ~IFF_LINK2; sc->sppp->pp_flags &= ~PP_FR; # endif @@ -4197,9 +4197,9 @@ config_proto(softc_t *sc, struct config *config) (config->line_prot == PROT_C_HDLC)) { LMC_BPF_DETACH; -# if (__NetBSD__ || __OpenBSD__) +# if (defined(__NetBSD__) || defined(__OpenBSD__)) sc->sppp->pp_flags |= PP_CISCO; -# elif __FreeBSD__ +# elif defined(__FreeBSD__) sc->ifp->if_flags |= IFF_LINK2; sc->sppp->pp_flags &= ~PP_FR; # endif @@ -4212,9 +4212,9 @@ config_proto(softc_t *sc, struct config *config) (config->line_prot == PROT_FRM_RLY)) { LMC_BPF_DETACH; -# if (__NetBSD__ || __OpenBSD__) +# if (defined(__NetBSD__) || defined(__OpenBSD__)) sc->sppp->pp_flags &= ~PP_CISCO; -# elif __FreeBSD__ +# elif defined(__FreeBSD__) sc->ifp->if_flags &= ~IFF_LINK2; sc->sppp->pp_flags |= PP_FR; # endif @@ -4464,7 +4464,7 @@ raw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { -# if (__FreeBSD__ && DEVICE_POLLING) /* XXX necessary? */ +# if (defined(__FreeBSD__) && DEVICE_POLLING) /* XXX necessary? */ case SIOCSIFCAP: # endif case SIOCSIFDSTADDR: @@ -4493,7 +4493,7 @@ static int ifnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { softc_t *sc = IFP2SC(ifp); -# if __OpenBSD__ +# ifdef __OpenBSD__ struct ifreq *ifr = (struct ifreq *) data; # endif int error = 0; @@ -4509,7 +4509,7 @@ ifnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case LMCIOCTL: error = core_ioctl(sc, cmd, data); break; -# if __OpenBSD__ +# ifdef __OpenBSD__ /* Catch the IOCTLs used by ifconfig. */ case SIOCSIFMEDIA: if ((error = CHECK_CAP)) break; @@ -4687,11 +4687,11 @@ ifnet_watchdog(struct ifnet *ifp) /* Notice change in line protocol. */ sc->status.line_pkg = PKG_SPPP; -# if __FreeBSD__ +# ifdef __FreeBSD__ if (sc->sppp->pp_flags & PP_FR) sc->status.line_prot = PROT_FRM_RLY; else if (sc->ifp->if_flags & IFF_LINK2) -# elif (__NetBSD__ || __OpenBSD__) +# elif (defined(__NetBSD__) || defined(__OpenBSD__)) if (sc->sppp->pp_flags & PP_CISCO) # endif sc->status.line_prot = PROT_C_HDLC; @@ -4714,7 +4714,7 @@ ifnet_watchdog(struct ifnet *ifp) ifp->if_oerrors = cntrs->oerrors; ifp->if_iqdrops = cntrs->idiscards; -# if ((__FreeBSD_version >= 500000) || __OpenBSD__ || __NetBSD__) +# if ((__FreeBSD_version >= 500000) || defined(__OpenBSD__) || defined(__NetBSD__)) if (sc->status.oper_status == STATUS_UP) ifp->if_link_state = LINK_STATE_UP; else @@ -4725,7 +4725,7 @@ ifnet_watchdog(struct ifnet *ifp) ifp->if_timer = 1; } -# if __OpenBSD__ +# ifdef __OpenBSD__ /* Callback from ifmedia. */ static int @@ -4815,7 +4815,7 @@ setup_ifnet(struct ifnet *ifp) ifp->if_mtu = MAX_DESC_LEN; /* sppp & p2p change this */ ifp->if_type = IFT_PTPSERIAL; /* p2p changes this */ -# if (__FreeBSD__ && DEVICE_POLLING) +# if (defined(__FreeBSD__) && DEVICE_POLLING) ifp->if_capabilities |= IFCAP_POLLING; # if (__FreeBSD_version < 500000) ifp->if_capenable |= IFCAP_POLLING; @@ -4823,18 +4823,18 @@ setup_ifnet(struct ifnet *ifp) # endif /* Every OS does it differently! */ -# if (__FreeBSD__ && (__FreeBSD_version < 502000)) +# if (defined(__FreeBSD__) && (__FreeBSD_version < 502000)) (const char *)ifp->if_name = device_get_name(sc->dev); ifp->if_unit = device_get_unit(sc->dev); # elif (__FreeBSD_version >= 502000) ifp->if_dname = device_get_name(sc->dev); ifp->if_dunit = device_get_unit(sc->dev); strlcpy(ifp->if_xname, device_get_nameunit(sc->dev), IFNAMSIZ); -# elif __NetBSD__ +# elif defined(__NetBSD__) strcpy(ifp->if_xname, sc->dev.dv_xname); # elif __OpenBSD__ bcopy(sc->dev.dv_xname, ifp->if_xname, IFNAMSIZ); -# elif __bsdi__ +# elif defined(__bsdi__) ifp->if_name = sc->dev.dv_cfdata->cf_driver->cd_name; ifp->if_unit = sc->dev.dv_unit; # endif @@ -4872,14 +4872,15 @@ ifnet_attach(softc_t *sc) /* Attach to the ifnet kernel interface. */ if_attach(sc->ifp); -# if ((__NetBSD_Version__ >= 106000000) || (OpenBSD >= 200211)) +# if ((defined(__NetBSD__) && __NetBSD_Version__ >= 106000000) || \ + (defined(__OpenBSD__) && OpenBSD >= 200211)) if_alloc_sadl(sc->ifp); # endif /* Attach Berkeley Packet Filter. */ LMC_BPF_ATTACH(DLT_RAW, 0); -# if __OpenBSD__ +# ifdef __OpenBSD__ /* Initialize ifmedia mechanism. */ ifmedia_init(&sc->ifm, IFM_OMASK | IFM_GMASK | IFM_IMASK, ifmedia_change, ifmedia_status); @@ -4911,11 +4912,11 @@ ifnet_attach(softc_t *sc) static void ifnet_detach(softc_t *sc) { -# if __OpenBSD__ +# ifdef __OpenBSD__ ifmedia_delete_instance(&sc->ifm, IFM_INST_ANY); # endif -# if (__FreeBSD__ && DEVICE_POLLING) +# if (defined(__FreeBSD__) && DEVICE_POLLING) if (sc->ifp->if_capenable & IFCAP_POLLING) ether_poll_deregister(sc->ifp); # endif @@ -4923,7 +4924,8 @@ ifnet_detach(softc_t *sc) /* Detach Berkeley Packet Filter. */ LMC_BPF_DETACH; -# if ((__NetBSD_Version__ >= 106000000) || (OpenBSD >= 200211)) +# if ((defined(__NetBSD__) && __NetBSD_Version__ >= 106000000) || \ + (defined(__OpenBSD__) && OpenBSD >= 200211)) if_free_sadl(sc->ifp); # endif @@ -5210,7 +5212,7 @@ struct ng_type ng_type = .findhook = NULL, .connect = ng_connect, .rcvdata = ng_rcvdata, -# if (__FreeBSD__ && (__FreeBSD_version < 500000)) +# if (defined(__FreeBSD__) && (__FreeBSD_version < 500000)) .rcvdataq = ng_rcvdata, # endif .disconnect = ng_disconnect, @@ -5570,7 +5572,7 @@ detach_card(softc_t *sc) /* This is the I/O configuration interface for FreeBSD */ -#if __FreeBSD__ +#ifdef __FreeBSD__ static int fbsd_probe(device_t dev) @@ -5753,7 +5755,7 @@ MODULE_DEPEND(if_lmc, sppp, 1, 1, 1); /* This is the I/O configuration interface for NetBSD. */ -#if __NetBSD__ +#ifdef __NetBSD__ static int nbsd_match(struct device *parent, struct cfdata *match, void *aux) @@ -6045,7 +6047,7 @@ int if_lmc_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) /* This is the I/O configuration interface for OpenBSD. */ -#if __OpenBSD__ +#ifdef __OpenBSD__ static int obsd_match(struct device *parent, void *match, void *aux) @@ -6295,7 +6297,7 @@ int if_lmc_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) /* This is the I/O configuration interface for BSD/OS. */ -#if __bsdi__ +#ifdef __bsdi__ static int bsdi_match(pci_devaddr_t *pa) @@ -6412,7 +6414,7 @@ struct cfdriver lmccd = }; #endif /* __bsdi__ */ -#if __linux__ +#ifdef __linux__ /* The kernel calls this procedure when an interrupt happens. */ static irqreturn_t diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c index ec51575..8d89e08 100644 --- a/sys/dev/my/if_my.c +++ b/sys/dev/my/if_my.c @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); static int MY_USEIOSPACE = 1; -#if (MY_USEIOSPACE) +#ifdef MY_USEIOSPACE #define MY_RES SYS_RES_IOPORT #define MY_RID MY_PCI_LOIO #else diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 04ce4c6..f2433b2 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -813,7 +813,7 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports) rp->rp_intmask = RXF_TRIG | TXFIFO_MT | SRC_INT | DELTA_CD | DELTA_CTS | DELTA_DSR; -#if notdef +#ifdef notdef ChanStatus = sGetChanStatus(&rp->rp_channel); #endif /* notdef */ if(sInitChan(ctlp, &rp->rp_channel, aiop, chan) == 0) { diff --git a/sys/dev/rp/rp_isa.c b/sys/dev/rp/rp_isa.c index ebefe4f..2f61230 100644 --- a/sys/dev/rp/rp_isa.c +++ b/sys/dev/rp/rp_isa.c @@ -242,7 +242,7 @@ rp_attach(device_t dev) ctlp = device_get_softc(dev); -#if notdef +#ifdef notdef num_aiops = sInitController(ctlp, rp_controller, MAX_AIOPS_PER_BOARD, 0, diff --git a/sys/dev/rp/rp_pci.c b/sys/dev/rp/rp_pci.c index f7a080c..46ed561 100644 --- a/sys/dev/rp/rp_pci.c +++ b/sys/dev/rp/rp_pci.c @@ -104,7 +104,7 @@ static devclass_t rp_devclass; static int rp_pciprobe(device_t dev); static int rp_pciattach(device_t dev); -#if notdef +#ifdef notdef static int rp_pcidetach(device_t dev); static int rp_pcishutdown(device_t dev); #endif /* notdef */ @@ -306,7 +306,7 @@ sPCIInitController( CONTROLLER_t *CtlP, CtlP->AiopNumChan[i] = 8; break; default: -#if notdef +#ifdef notdef CtlP->AiopNumChan[i] = 8; #else CtlP->AiopNumChan[i] = sReadAiopNumChan(CtlP, i); diff --git a/sys/dev/rp/rpvar.h b/sys/dev/rp/rpvar.h index 66aa219..9b1790d 100644 --- a/sys/dev/rp/rpvar.h +++ b/sys/dev/rp/rpvar.h @@ -68,6 +68,6 @@ struct rp_port { }; /* Actually not used */ -#if notdef +#ifdef notdef extern struct termios deftermios; #endif /* notdef */ diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index 3142753..1e38295 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -644,7 +644,7 @@ csa_initialize(sc_p scp) /* * Set the serial port FIFO pointer to the first sample in the FIFO. */ -#if notdef +#ifdef notdef csa_writeio(resp, BA0_SERBSP, 0); #endif /* notdef */ @@ -698,7 +698,7 @@ csa_initialize(sc_p scp) * First, lets wait a short while to let things settle out a bit, * and to prevent retrying the read too quickly. */ -#if notdef +#ifdef notdef DELAY(10000000L); /* clw */ #else DELAY(1000); @@ -728,7 +728,7 @@ csa_initialize(sc_p scp) * Power down the DAC and ADC. We will power them up (if) when we need * them. */ -#if notdef +#ifdef notdef csa_writeio(resp, BA0_AC97_POWERDOWN, 0x300); #endif /* notdef */ @@ -736,7 +736,7 @@ csa_initialize(sc_p scp) * Turn off the Processor by turning off the software clock enable flag in * the clock control register. */ -#if notdef +#ifdef notdef clkcr1 = csa_readio(resp, BA0_CLKCR1) & ~CLKCR1_SWCE; csa_writeio(resp, BA0_CLKCR1, clkcr1); #endif /* notdef */ diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index 880527e..e46612d 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); #include <sys/device.h> #endif -#if NRND > 0 +#if defined(NRND) && NRND > 0 #include <sys/rnd.h> #endif @@ -465,7 +465,7 @@ USB_ATTACH(udav) ether_ifattach(ifp, eaddr); #endif -#if NRND > 0 +#if defined(NRND) && NRND > 0 rnd_attach_source(&sc->rnd_source, devname, RND_TYPE_NET, 0); #endif @@ -529,7 +529,7 @@ USB_DETACH(udav) #endif udav_stop(GET_IFP(sc), 1); -#if NRND > 0 +#if defined(NRND) && NRND > 0 rnd_detach_source(&sc->rnd_source); #endif #if defined(__NetBSD__) diff --git a/sys/dev/usb/if_udavreg.h b/sys/dev/usb/if_udavreg.h index 5982857..426a889 100644 --- a/sys/dev/usb/if_udavreg.h +++ b/sys/dev/usb/if_udavreg.h @@ -194,7 +194,7 @@ struct udav_softc { struct lock sc_mii_lock; int sc_link; #define sc_media udav_mii.mii_media -#if NRND > 0 +#if defined(NRND) && NRND > 0 rndsource_element_t rnd_source; #endif struct ue_cdata sc_cdata; diff --git a/sys/dev/usb/sl811hs.c b/sys/dev/usb/sl811hs.c index 7599f57..2196e9f 100644 --- a/sys/dev/usb/sl811hs.c +++ b/sys/dev/usb/sl811hs.c @@ -1519,7 +1519,7 @@ slhci_transaction(struct slhci_softc *sc, usbd_pipe_handle pipe, sl11write(sc, SL11_ISR, 0xff); DPRINTF(D_XFER, ("t=%d i=%x ", SLHCI_TIMEOUT - timeout, isr)); -#if SLHCI_DEBUG +#ifdef SLHCI_DEBUG bitmask_snprintf(result, "\20\x8STALL\7NAK\6OV\5SETUP\4DATA1\3TIMEOUT\2ERR\1ACK", str, sizeof(str)); @@ -1535,7 +1535,7 @@ slhci_transaction(struct slhci_softc *sc, usbd_pipe_handle pipe, /* Read buffer if PID_IN */ if (pid == SL11_PID_IN && len > 0) { sl11read_region(sc, buf, 0x40, len); -#if SLHCI_DEBUG +#ifdef SLHCI_DEBUG for (i = 0; i < len; i++) DPRINTF(D_XFER, ("%02X ", buf[i])); #endif diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index 9e853c2..a427b2c 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -200,7 +200,7 @@ Static void uplcom_rts(struct uplcom_softc *, int); Static void uplcom_break(struct uplcom_softc *, int); Static void uplcom_set_line_state(struct uplcom_softc *); Static void uplcom_get_status(void *, int, u_char *, u_char *); -#if TODO +#if 0 /* TODO */ Static int uplcom_ioctl(void *, int, u_long, caddr_t, int, usb_proc_ptr); #endif Static int uplcom_param(void *, int, struct termios *); @@ -988,7 +988,7 @@ uplcom_get_status(void *addr, int portno, u_char *lsr, u_char *msr) *msr = sc->sc_msr; } -#if TODO +#if 0 /* TODO */ Static int uplcom_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c index d92dc0d..07e42f5 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -203,7 +203,7 @@ Static void uvscom_break(struct uvscom_softc *, int); Static void uvscom_set(void *, int, int, int); Static void uvscom_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); -#if TODO +#if 0 /* TODO */ Static int uvscom_ioctl(void *, int, u_long, caddr_t, int, usb_proc_ptr); #endif Static int uvscom_param(void *, int, struct termios *); @@ -935,7 +935,7 @@ uvscom_get_status(void *addr, int portno, u_char *lsr, u_char *msr) *msr = sc->sc_msr; } -#if TODO +#if 0 /* TODO */ Static int uvscom_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) |