diff options
author | marius <marius@FreeBSD.org> | 2007-01-18 19:19:19 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2007-01-18 19:19:19 +0000 |
commit | a312b87531ac2951f73f0137a9d8b5b36f53784a (patch) | |
tree | 09bd0d91113afdbf5650693c38cbabb61873f524 /sys | |
parent | d7c0868be350640ac572c455d538fb72de85cacb (diff) | |
download | FreeBSD-src-a312b87531ac2951f73f0137a9d8b5b36f53784a.zip FreeBSD-src-a312b87531ac2951f73f0137a9d8b5b36f53784a.tar.gz |
- Probe the CS4231 in USIII machines.
- Remove unused variables. [1]
Reported by: Coverity Prevent (CID 700, 701) [1]
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sound/sbus/cs4231.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/sound/sbus/cs4231.c b/sys/dev/sound/sbus/cs4231.c index af85c8a..695b9e7 100644 --- a/sys/dev/sound/sbus/cs4231.c +++ b/sys/dev/sound/sbus/cs4231.c @@ -306,10 +306,12 @@ MIXER_DECLARE(cs4231_mixer); static int cs4231_bus_probe(device_t dev) { - const char *name; + const char *compat, *name; + compat = ofw_bus_get_compat(dev); name = ofw_bus_get_name(dev); - if (strcmp("SUNW,CS4231", name) == 0) { + if (strcmp("SUNW,CS4231", name) == 0 || + (compat != NULL && strcmp("SUNW,CS4231", compat) == 0)) { device_set_desc(dev, "Sun Audiocs"); return (BUS_PROBE_DEFAULT); } @@ -319,11 +321,9 @@ cs4231_bus_probe(device_t dev) static int cs4231_sbus_attach(device_t dev) { - struct snddev_info *d; struct cs4231_softc *sc; int burst; - d = device_get_softc(dev); sc = malloc(sizeof(struct cs4231_softc), M_DEVBUF, M_NOWAIT | M_ZERO); if (sc == NULL) { device_printf(dev, "cannot allocate softc\n"); @@ -352,10 +352,8 @@ cs4231_sbus_attach(device_t dev) static int cs4231_ebus_attach(device_t dev) { - struct snddev_info *d; struct cs4231_softc *sc; - d = device_get_softc(dev); sc = malloc(sizeof(struct cs4231_softc), M_DEVBUF, M_NOWAIT | M_ZERO); if (sc == NULL) { device_printf(dev, "cannot allocate softc\n"); |