summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/ac97.c
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2000-01-18 17:13:43 +0000
committercg <cg@FreeBSD.org>2000-01-18 17:13:43 +0000
commitfc15400060f2632255029d99d6de8f8f31880596 (patch)
tree34ef7acb1f7683904321a28a08828a8b624489ea /sys/dev/sound/pcm/ac97.c
parent3005c00a64df52d1c5d631814a99d0c94d7cfee6 (diff)
downloadFreeBSD-src-fc15400060f2632255029d99d6de8f8f31880596.zip
FreeBSD-src-fc15400060f2632255029d99d6de8f8f31880596.tar.gz
update ac97 layer to use device_printf when printing messages
Diffstat (limited to 'sys/dev/sound/pcm/ac97.c')
-rw-r--r--sys/dev/sound/pcm/ac97.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c
index 7785436..e0ddad7 100644
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -64,6 +64,7 @@ struct ac97mixtable_entry {
};
struct ac97_info {
+ device_t dev;
ac97_read *read;
ac97_write *write;
void *devinfo;
@@ -262,11 +263,12 @@ ac97_init(struct ac97_info *codec)
codec->write(codec->devinfo, AC97_MIX_MASTER, 0x00);
if (bootverbose) {
- printf("ac97: codec id 0x%8x", id);
+ device_printf(codec->dev, "ac97 codec id 0x%8x", id);
for (i = 0; ac97codecid[i].id; i++) {
if (ac97codecid[i].id == id) printf(" (%s)", ac97codecid[i].name);
}
- printf("\nac97: codec features ");
+ printf("\n");
+ device_printf(codec->dev, "ac97 codec features ");
for (i = j = 0; i < 10; i++) {
if (codec->caps & (1 << i)) {
printf("%s%s", j? ", " : "", ac97feature[i]);
@@ -278,17 +280,18 @@ ac97_init(struct ac97_info *codec)
}
if ((codec->read(codec->devinfo, AC97_REG_POWER) & 2) == 0)
- printf("ac97: dac not ready\n");
+ device_printf(codec->dev, "ac97 codec reports dac not ready\n");
return 0;
}
struct ac97_info *
-ac97_create(void *devinfo, ac97_read *rd, ac97_write *wr)
+ac97_create(device_t dev, void *devinfo, ac97_read *rd, ac97_write *wr)
{
struct ac97_info *codec;
codec = (struct ac97_info *)malloc(sizeof *codec, M_DEVBUF, M_NOWAIT);
if (codec != NULL) {
+ codec->dev = dev;
codec->read = rd;
codec->write = wr;
codec->devinfo = devinfo;
OpenPOWER on IntegriCloud