const'ify ad1848 devmap.

This commit is contained in:
martin 2007-12-11 00:21:51 +00:00
parent 2ce2127701
commit f40133bd10
3 changed files with 14 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ad1848.c,v 1.26 2007/10/19 11:59:44 ad Exp $ */
/* $NetBSD: ad1848.c,v 1.27 2007/12/11 00:21:51 martin Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ad1848.c,v 1.26 2007/10/19 11:59:44 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: ad1848.c,v 1.27 2007/12/11 00:21:51 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -628,8 +628,8 @@ ad1848_get_mic_gain(struct ad1848_softc *sc, struct ad1848_volume *gp)
return 0;
}
static ad1848_devmap_t *
ad1848_mixer_find_dev(ad1848_devmap_t *map, int cnt, mixer_ctrl_t *cp)
static const ad1848_devmap_t *
ad1848_mixer_find_dev(const ad1848_devmap_t *map, int cnt, mixer_ctrl_t *cp)
{
int i;
@ -642,10 +642,10 @@ ad1848_mixer_find_dev(ad1848_devmap_t *map, int cnt, mixer_ctrl_t *cp)
}
int
ad1848_mixer_get_port(struct ad1848_softc *ac, struct ad1848_devmap *map,
ad1848_mixer_get_port(struct ad1848_softc *ac, const struct ad1848_devmap *map,
int cnt, mixer_ctrl_t *cp)
{
ad1848_devmap_t *entry;
const ad1848_devmap_t *entry;
struct ad1848_volume vol;
int error;
int dev;
@ -715,10 +715,10 @@ ad1848_mixer_get_port(struct ad1848_softc *ac, struct ad1848_devmap *map,
}
int
ad1848_mixer_set_port(struct ad1848_softc *ac, struct ad1848_devmap *map,
ad1848_mixer_set_port(struct ad1848_softc *ac, const struct ad1848_devmap *map,
int cnt, mixer_ctrl_t *cp)
{
ad1848_devmap_t *entry;
const ad1848_devmap_t *entry;
struct ad1848_volume vol;
int error;
int dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ad1848var.h,v 1.14 2005/12/11 12:21:25 christos Exp $ */
/* $NetBSD: ad1848var.h,v 1.15 2007/12/11 00:21:51 martin Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -171,9 +171,9 @@ void ad1848_reset(struct ad1848_softc *);
int ad1848_open(void *, int);
void ad1848_close(void *);
int ad1848_mixer_get_port(struct ad1848_softc *, ad1848_devmap_t *,
int ad1848_mixer_get_port(struct ad1848_softc *, const ad1848_devmap_t *,
int, mixer_ctrl_t *);
int ad1848_mixer_set_port(struct ad1848_softc *, ad1848_devmap_t *,
int ad1848_mixer_set_port(struct ad1848_softc *, const ad1848_devmap_t *,
int, mixer_ctrl_t *);
int ad1848_set_speed(struct ad1848_softc *, u_int *);
void ad1848_mute_wave_output(struct ad1848_softc *, int, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cs4231.c,v 1.19 2007/10/19 11:59:50 ad Exp $ */
/* $NetBSD: cs4231.c,v 1.20 2007/12/11 00:21:51 martin Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cs4231.c,v 1.19 2007/10/19 11:59:50 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: cs4231.c,v 1.20 2007/12/11 00:21:51 martin Exp $");
#include "audio.h"
#if NAUDIO > 0
@ -382,7 +382,7 @@ cs4231_getdev(void *addr, struct audio_device *retp)
return 0;
}
static ad1848_devmap_t csmapping[] = {
static const ad1848_devmap_t csmapping[] = {
{ CSAUDIO_DAC_LVL, AD1848_KIND_LVL, AD1848_AUX1_CHANNEL },
{ CSAUDIO_LINE_IN_LVL, AD1848_KIND_LVL, AD1848_LINE_CHANNEL },
{ CSAUDIO_MONO_LVL, AD1848_KIND_LVL, AD1848_MONO_CHANNEL },