Compile in radio(4) only it is activated in the kernel configuration.

This commit is contained in:
tron 2002-01-06 23:19:18 +00:00
parent df7858b179
commit 6a997e3c73
1 changed files with 16 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bktr_os.c,v 1.24 2002/01/06 15:37:08 jmcneill Exp $ */
/* $NetBSD: bktr_os.c,v 1.25 2002/01/06 23:19:18 tron Exp $ */
/* FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp */
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.24 2002/01/06 15:37:08 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.25 2002/01/06 23:19:18 tron Exp $");
#ifdef __FreeBSD__
#include "bktr.h"
@ -139,6 +139,10 @@ SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audi
/**************************/
#if defined(__NetBSD__) || defined(__OpenBSD__)
#ifdef __NetBSD__
#include "radio.h"
#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@ -149,7 +153,9 @@ SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audi
#include <sys/poll.h>
#include <sys/select.h>
#include <sys/vnode.h>
#if defined(__NetBSD__) && (NRADIO > 0)
#include <sys/radioio.h>
#endif
#ifndef __NetBSD__
#include <vm/vm.h>
@ -162,7 +168,9 @@ SYSCTL_INT(_hw_bt848, OID_AUTO, slow_msp_audio, CTLFLAG_RW, &bt848_slow_msp_audi
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
#if defined(__NetBSD__) && (NRADIO > 0)
#include <dev/radio_if.h>
#endif
#define BKTR_DEBUG
#ifdef BKTR_DEBUG
@ -1324,6 +1332,7 @@ struct cfdriver bktr_cd = {
#endif
#if defined(__NetBSD__) && (NRADIO > 0)
/* for radio(4) */
int bktr_get_info(void *, struct radio_info *);
int bktr_set_info(void *, struct radio_info *);
@ -1335,6 +1344,7 @@ struct radio_hw_if bktr_hw_if = {
bktr_set_info,
NULL /* search */
};
#endif
int
bktr_probe(parent, match, aux)
@ -1518,8 +1528,10 @@ bktr_attach(struct device *parent, struct device *self, void *aux)
common_bktr_attach(bktr, unit, fun, rev);
#if defined(__NetBSD__) && (NRADIO > 0)
/* attach to radio(4) */
radio_attach_mi(&bktr_hw_if, bktr, &bktr->bktr_dev);
#endif
}
@ -1776,6 +1788,7 @@ bktr_mmap(dev_t dev, off_t offset, int nprot)
#endif
}
#if defined(__NetBSD__) && (NRADIO > 0)
int
bktr_set_info(void *v, struct radio_info *ri)
{
@ -1830,5 +1843,6 @@ bktr_get_info(void *v, struct radio_info *ri)
return (0);
}
#endif
#endif /* __NetBSD__ || __OpenBSD__ */