Module Name: src Committed By: martin Date: Tue Nov 19 12:56:48 UTC 2019
Modified Files: src/sys/dev/usb [netbsd-9]: uaudio.c Log Message: Pull up following revision(s) (requested by isaki in ticket #447): sys/dev/usb/uaudio.c: revision 1.162 Use kmem_zalloc() instead of kmem_alloc() to initialize structure. struct audio_format added a member since isaki-audio2. Fix PR kern/54662 "uaudio sometimes not recognized". To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.161.2.1 src/sys/dev/usb/uaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/uaudio.c diff -u src/sys/dev/usb/uaudio.c:1.161 src/sys/dev/usb/uaudio.c:1.161.2.1 --- src/sys/dev/usb/uaudio.c:1.161 Thu Jun 6 12:59:33 2019 +++ src/sys/dev/usb/uaudio.c Tue Nov 19 12:56:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uaudio.c,v 1.161 2019/06/06 12:59:33 isaki Exp $ */ +/* $NetBSD: uaudio.c,v 1.161.2.1 2019/11/19 12:56:48 martin Exp $ */ /* * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.161 2019/06/06 12:59:33 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.161.2.1 2019/11/19 12:56:48 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1795,13 +1795,12 @@ uaudio_identify_as(struct uaudio_softc * } /* build audio_format array */ - sc->sc_formats = kmem_alloc(sizeof(struct audio_format) * sc->sc_nalts, + sc->sc_formats = kmem_zalloc(sizeof(struct audio_format) * sc->sc_nalts, KM_SLEEP); sc->sc_nformats = sc->sc_nalts; for (i = 0; i < sc->sc_nalts; i++) { auf = &sc->sc_formats[i]; t1desc = sc->sc_alts[i].asf1desc; - auf->driver_data = NULL; if (UE_GET_DIR(sc->sc_alts[i].edesc->bEndpointAddress) == UE_DIR_OUT) auf->mode = AUMODE_PLAY; else