Fix grammar in a comment, and use named constants for better readability.
This commit is contained in:
parent
f0ad84f7e8
commit
b08283e19d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sb.c,v 1.82 2006/04/13 00:30:19 christos Exp $ */
|
||||
/* $NetBSD: sb.c,v 1.83 2006/04/13 09:47:19 cube Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb.c,v 1.82 2006/04/13 00:30:19 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb.c,v 1.83 2006/04/13 09:47:19 cube Exp $");
|
||||
|
||||
#include "midi.h"
|
||||
|
||||
@ -236,12 +236,12 @@ sbattach(struct sbdsp_softc *sc)
|
||||
#if NMPU > 0
|
||||
switch(sc->sc_hasmpu) {
|
||||
default:
|
||||
case -1: /* no mpu */
|
||||
case SBMPU_NONE: /* no mpu */
|
||||
break;
|
||||
case 0: /* try to attach midi directly */
|
||||
case SBMPU_INTERNAL: /* try to attach midi directly */
|
||||
midi_attach_mi(&sb_midi_hw_if, sc, &sc->sc_dev);
|
||||
break;
|
||||
case 1: /* search for mpu */
|
||||
case SBMPU_EXTERNAL: /* search for mpu */
|
||||
arg.type = AUDIODEV_TYPE_MPU;
|
||||
arg.hwif = 0;
|
||||
arg.hdl = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sbdspvar.h,v 1.57 2005/12/11 12:22:03 christos Exp $ */
|
||||
/* $NetBSD: sbdspvar.h,v 1.58 2006/04/13 09:47:19 cube Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -179,6 +179,9 @@ struct sbdsp_softc {
|
||||
|
||||
#if NMPU > 0
|
||||
int sc_hasmpu;
|
||||
#define SBMPU_EXTERNAL 1
|
||||
#define SBMPU_INTERNAL 0
|
||||
#define SBMPU_NONE -1
|
||||
struct device *sc_mpudev;
|
||||
bus_space_tag_t sc_mpu_iot; /* tag */
|
||||
bus_space_handle_t sc_mpu_ioh; /* handle */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sb_isapnp.c,v 1.46 2006/04/13 00:30:20 christos Exp $ */
|
||||
/* $NetBSD: sb_isapnp.c,v 1.47 2006/04/13 09:47:19 cube Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c,v 1.46 2006/04/13 00:30:20 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb_isapnp.c,v 1.47 2006/04/13 09:47:19 cube Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -136,13 +136,13 @@ sb_isapnp_attach(struct device *parent, struct device *self, void *aux)
|
||||
|
||||
#if NMPU > 0
|
||||
/*
|
||||
* Aztech 1020 don't store information about it's mpu in io[1]
|
||||
* It has a seperate pnpdev for the mpu
|
||||
* Aztech 1020 doesn't store information about its mpu in io[1].
|
||||
* It has a seperate pnpdev for the mpu.
|
||||
*/
|
||||
if (strcmp(ipa->ipa_devlogic, "AZT1016") == 0)
|
||||
sc->sc_hasmpu = -1;
|
||||
sc->sc_hasmpu = SBMPU_NONE;
|
||||
else if (ipa->ipa_nio > 1) {
|
||||
sc->sc_hasmpu = 1;
|
||||
sc->sc_hasmpu = SBMPU_EXTERNAL;
|
||||
sc->sc_mpu_iot = ipa->ipa_iot;
|
||||
sc->sc_mpu_ioh = ipa->ipa_io[1].h;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user