From d76c7ff74aa92ba065ed09ce3b733c6b9451a396 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 30 Aug 2006 01:14:24 +0000 Subject: [PATCH] - fix missing initializer - fix < 0 comparison with unsigned --- sys/dev/pci/eso.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c index f9050f8a81df..9d0296f7d68e 100644 --- a/sys/dev/pci/eso.c +++ b/sys/dev/pci/eso.c @@ -1,4 +1,4 @@ -/* $NetBSD: eso.c,v 1.42 2006/04/14 19:03:32 christos Exp $ */ +/* $NetBSD: eso.c,v 1.43 2006/08/30 01:14:24 christos Exp $ */ /* * Copyright (c) 1999, 2000, 2004 Klaus J. Klein @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.42 2006/04/14 19:03:32 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.43 2006/08/30 01:14:24 christos Exp $"); #include "mpu.h" @@ -154,6 +154,7 @@ static const struct audio_hw_if eso_hw_if = { eso_trigger_output, eso_trigger_input, NULL, /* dev_ioctl */ + NULL, /* powerstate */ }; static const char * const eso_rev2model[] = { @@ -749,7 +750,10 @@ eso_set_params(void *hdl, int setmode, int usemode, audio_params_t *play, r[1] = ESO_CLK1 / (128 - (rd[1] = 128 - ESO_CLK1 / p->sample_rate)); - clk = ABS(p->sample_rate - r[0]) > ABS(p->sample_rate - r[1]); + if (r[0] > r[1]) + clk = p->sample_rate - r[1]; + else + clk = p->sample_rate - r[0]; srg = rd[clk] | (clk == 1 ? ESO_CLK1_SELECT : 0x00); /* Roll-off frequency of 87%, as in the ES1888 driver. */