Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Use C99 style struct initializer to audio_hw_if.
details: https://anonhg.NetBSD.org/src/rev/0768e5a293fa
branches: trunk
changeset: 997616:0768e5a293fa
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Mar 16 12:09:56 2019 +0000
description:
Use C99 style struct initializer to audio_hw_if.
diffstat:
sys/arch/amiga/dev/aucc.c | 48 +++++--------
sys/arch/amiga/dev/repulse.c | 47 +++++--------
sys/arch/amiga/dev/toccata.c | 61 +++++++----------
sys/arch/arm/iomd/vidcaudio.c | 46 ++++--------
sys/arch/arm/xscale/pxa2x0_ac97.c | 49 +++++--------
sys/arch/dreamcast/dev/g2/aica.c | 50 +++++---------
sys/arch/evbarm/mini2440/audio_mini2440.c | 46 +++++--------
sys/arch/hpcmips/vr/vraiu.c | 50 +++++--------
sys/arch/hppa/gsc/harmony.c | 49 +++++--------
sys/arch/macppc/dev/awacs.c | 48 +++++--------
sys/arch/macppc/dev/snapper.c | 47 +++++--------
sys/arch/prep/isa/paud_isa.c | 52 ++++++--------
sys/arch/sgimips/hpc/haltwo.c | 47 +++++--------
sys/arch/sgimips/mace/mavb.c | 46 +++++--------
sys/arch/sparc/dev/audioamd.c | 48 +++++--------
sys/arch/vax/vsa/vsaudio.c | 44 ++++--------
sys/arch/x68k/dev/vs.c | 51 ++++++--------
sys/dev/bluetooth/btsco.c | 51 ++++++--------
sys/dev/ebus/cs4231_ebus.c | 50 +++++--------
sys/dev/ic/tms320av110.c | 49 +++++--------
sys/dev/isa/aria.c | 48 +++++--------
sys/dev/isa/ess.c | 102 ++++++++++++-----------------
sys/dev/isa/gus.c | 102 ++++++++++++-----------------
sys/dev/isa/pas.c | 52 ++++++--------
sys/dev/isa/sb.c | 52 ++++++--------
sys/dev/isa/wss.c | 52 ++++++--------
sys/dev/isa/ym.c | 52 ++++++--------
sys/dev/isapnp/gus_isapnp.c | 56 +++++++--------
sys/dev/pci/auacer.c | 49 +++++--------
sys/dev/pci/auich.c | 51 ++++++--------
sys/dev/pci/auixp.c | 50 +++++--------
sys/dev/pci/autri.c | 50 +++++--------
sys/dev/pci/auvia.c | 51 ++++++--------
sys/dev/pci/azalia.c | 50 +++++--------
sys/dev/pci/cmpci.c | 49 +++++--------
sys/dev/pci/cs4280.c | 49 +++++--------
sys/dev/pci/cs4281.c | 49 +++++--------
sys/dev/pci/eap.c | 96 +++++++++++-----------------
sys/dev/pci/emuxki.c | 51 ++++++--------
sys/dev/pci/esa.c | 50 +++++--------
sys/dev/pci/esm.c | 51 ++++++--------
sys/dev/pci/eso.c | 49 +++++--------
sys/dev/pci/fms.c | 49 +++++--------
sys/dev/pci/neo.c | 49 +++++--------
sys/dev/pci/sv.c | 50 +++++--------
sys/dev/sbus/cs4231_sbus.c | 49 +++++--------
sys/dev/tc/bba.c | 52 ++++++--------
sys/dev/usb/uaudio.c | 48 +++++--------
48 files changed, 1014 insertions(+), 1523 deletions(-)
diffs (truncated from 3511 to 300 lines):
diff -r 965460f0aaf8 -r 0768e5a293fa sys/arch/amiga/dev/aucc.c
--- a/sys/arch/amiga/dev/aucc.c Sat Mar 16 11:50:48 2019 +0000
+++ b/sys/arch/amiga/dev/aucc.c Sat Mar 16 12:09:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aucc.c,v 1.43 2014/03/22 01:52:44 christos Exp $ */
+/* $NetBSD: aucc.c,v 1.44 2019/03/16 12:09:56 isaki Exp $ */
/*
* Copyright (c) 1999 Bernardo Innocenti
@@ -53,7 +53,7 @@
#if NAUCC > 0
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.43 2014/03/22 01:52:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aucc.c,v 1.44 2019/03/16 12:09:56 isaki Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -231,34 +231,22 @@
const struct audio_hw_if sa_hw_if = {
- aucc_open,
- aucc_close,
- NULL,
- aucc_query_encoding,
- aucc_set_params,
- aucc_round_blocksize,
- aucc_commit_settings,
- NULL,
- NULL,
- aucc_start_output,
- aucc_start_input,
- aucc_halt_output,
- aucc_halt_input,
- NULL,
- aucc_getdev,
- NULL,
- aucc_set_port,
- aucc_get_port,
- aucc_query_devinfo,
- NULL,
- NULL,
- NULL,
- NULL,
- aucc_get_props,
- NULL,
- NULL,
- NULL,
- aucc_get_locks,
+ .open = aucc_open,
+ .close = aucc_close,
+ .query_encoding = aucc_query_encoding,
+ .set_params = aucc_set_params,
+ .round_blocksize = aucc_round_blocksize,
+ .commit_settings = aucc_commit_settings,
+ .start_output = aucc_start_output,
+ .start_input = aucc_start_input,
+ .halt_output = aucc_halt_output,
+ .halt_input = aucc_halt_input,
+ .getdev = aucc_getdev,
+ .set_port = aucc_set_port,
+ .get_port = aucc_get_port,
+ .query_devinfo = aucc_query_devinfo,
+ .get_props = aucc_get_props,
+ .get_locks = aucc_get_locks,
};
/* autoconfig routines */
diff -r 965460f0aaf8 -r 0768e5a293fa sys/arch/amiga/dev/repulse.c
--- a/sys/arch/amiga/dev/repulse.c Sat Mar 16 11:50:48 2019 +0000
+++ b/sys/arch/amiga/dev/repulse.c Sat Mar 16 12:09:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: repulse.c,v 1.20 2014/01/22 00:25:16 christos Exp $ */
+/* $NetBSD: repulse.c,v 1.21 2019/03/16 12:09:56 isaki Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.20 2014/01/22 00:25:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: repulse.c,v 1.21 2019/03/16 12:09:56 isaki Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -96,34 +96,21 @@
/* audio attachment */
const struct audio_hw_if rep_hw_if = {
- /* open */ 0,
- rep_close,
- /* drain */ 0,
- rep_query_encoding,
- rep_set_params,
- rep_round_blocksize,
- /* commit_setting */ 0,
- /* init_output */ 0,
- /* init_input */ 0,
- rep_start_output,
- rep_start_input,
- rep_halt_output,
- rep_halt_input,
- /* speaker_ctl */ 0,
- rep_getdev,
- /* getfd */ 0,
- rep_set_port,
- rep_get_port,
- rep_query_devinfo,
- /* allocm */ 0,
- /* freem */ 0,
- rep_round_buffersize,
- /* mappage */ 0,
- rep_get_props,
- /* trigger_output */ 0,
- /* trigger_input */ 0,
- /* dev_ioctl */ 0,
- rep_get_locks,
+ .close = rep_close,
+ .query_encoding = rep_query_encoding,
+ .set_params = rep_set_params,
+ .round_blocksize = rep_round_blocksize,
+ .start_output = rep_start_output,
+ .start_input = rep_start_input,
+ .halt_output = rep_halt_output,
+ .halt_input = rep_halt_input,
+ .getdev = rep_getdev,
+ .set_port = rep_set_port,
+ .get_port = rep_get_port,
+ .query_devinfo = rep_query_devinfo,
+ .round_buffersize = rep_round_buffersize,
+ .get_props = rep_get_props,
+ .get_locks = rep_get_locks,
};
/* hardware registers */
diff -r 965460f0aaf8 -r 0768e5a293fa sys/arch/amiga/dev/toccata.c
--- a/sys/arch/amiga/dev/toccata.c Sat Mar 16 11:50:48 2019 +0000
+++ b/sys/arch/amiga/dev/toccata.c Sat Mar 16 12:09:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: toccata.c,v 1.17 2014/01/22 00:25:16 christos Exp $ */
+/* $NetBSD: toccata.c,v 1.18 2019/03/16 12:09:56 isaki Exp $ */
/*-
* Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.17 2014/01/22 00:25:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: toccata.c,v 1.18 2019/03/16 12:09:56 isaki Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -177,38 +177,31 @@
void toccata_get_locks(void *, kmutex_t **, kmutex_t **);
const struct audio_hw_if audiocs_hw_if = {
- toccata_open,
- toccata_close,
- 0, /*
- * XXX toccata_drain could be written:
- * sleep for play interrupt. This loses less than 512 bytes of
- * sample data, otherwise up to 1024.
- */
- ad1848_query_encoding,
- ad1848_set_params,
- toccata_round_blocksize,
- ad1848_commit_settings,
- 0, /* init_output */ /* XXX need this to prefill? */
- 0, /* init_input */
- toccata_start_output,
- toccata_start_input,
- toccata_halt_output,
- toccata_halt_input,
- 0, /* speaker */
- toccata_getdev,
- 0, /* setfd */
- toccata_set_port,
- toccata_get_port,
- toccata_query_devinfo,
- 0, /* alloc/free */
- 0,
- toccata_round_buffersize, /* round_buffer */
- 0, /* mappage */
- toccata_get_props,
- 0, /* trigger_output */
- 0,
- 0,
- toccata_get_locks,
+ .open = toccata_open,
+ .close = toccata_close,
+ /*
+ * XXX toccata_drain could be written:
+ * sleep for play interrupt. This loses less than 512 bytes of
+ * sample data, otherwise up to 1024.
+ */
+ .drain = NULL,
+ .query_encoding = ad1848_query_encoding,
+ .set_params = ad1848_set_params,
+ .round_blocksize = toccata_round_blocksize,
+ .commit_settings = ad1848_commit_settings,
+ .init_output = NULL, /* XXX need this to prefill? */
+ .init_input = NULL,
+ .start_output = toccata_start_output,
+ .start_input = toccata_start_input,
+ .halt_output = toccata_halt_output,
+ .halt_input = toccata_halt_input,
+ .getdev = toccata_getdev,
+ .set_port = toccata_set_port,
+ .get_port = toccata_get_port,
+ .query_devinfo = toccata_query_devinfo,
+ .round_buffersize = toccata_round_buffersize,
+ .get_props = toccata_get_props,
+ .get_locks = toccata_get_locks,
};
struct toccata_softc {
diff -r 965460f0aaf8 -r 0768e5a293fa sys/arch/arm/iomd/vidcaudio.c
--- a/sys/arch/arm/iomd/vidcaudio.c Sat Mar 16 11:50:48 2019 +0000
+++ b/sys/arch/arm/iomd/vidcaudio.c Sat Mar 16 12:09:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vidcaudio.c,v 1.56 2018/09/03 16:29:23 riastradh Exp $ */
+/* $NetBSD: vidcaudio.c,v 1.57 2019/03/16 12:09:56 isaki Exp $ */
/*
* Copyright (c) 1995 Melvin Tang-Richardson
@@ -65,7 +65,7 @@
#include <sys/param.h> /* proc.h */
-__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.56 2018/09/03 16:29:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vidcaudio.c,v 1.57 2019/03/16 12:09:56 isaki Exp $");
#include <sys/audioio.h>
#include <sys/conf.h> /* autoconfig functions */
@@ -172,34 +172,20 @@
};
static const struct audio_hw_if vidcaudio_hw_if = {
- NULL, /* open */
- vidcaudio_close,
- NULL,
- vidcaudio_query_encoding,
- vidcaudio_set_params,
- vidcaudio_round_blocksize,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- vidcaudio_halt_output,
- vidcaudio_halt_input,
- NULL,
- vidcaudio_getdev,
- NULL,
- vidcaudio_set_port,
- vidcaudio_get_port,
- vidcaudio_query_devinfo,
- NULL,
- NULL,
- NULL,
- NULL,
- vidcaudio_get_props,
- vidcaudio_trigger_output,
- vidcaudio_trigger_input,
- NULL,
- vidcaudio_get_locks,
+ .close = vidcaudio_close,
+ .query_encoding = vidcaudio_query_encoding,
+ .set_params = vidcaudio_set_params,
+ .round_blocksize = vidcaudio_round_blocksize,
+ .halt_output = vidcaudio_halt_output,
+ .halt_input = vidcaudio_halt_input,
+ .getdev = vidcaudio_getdev,
+ .set_port = vidcaudio_set_port,
+ .get_port = vidcaudio_get_port,
+ .query_devinfo = vidcaudio_query_devinfo,
+ .get_props = vidcaudio_get_props,
+ .trigger_output = vidcaudio_trigger_output,
+ .trigger_input = vidcaudio_trigger_input,
+ .get_locks = vidcaudio_get_locks,
};
static int
diff -r 965460f0aaf8 -r 0768e5a293fa sys/arch/arm/xscale/pxa2x0_ac97.c
--- a/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Mar 16 11:50:48 2019 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Mar 16 12:09:56 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pxa2x0_ac97.c,v 1.14 2017/06/01 02:45:06 chs Exp $ */
+/* $NetBSD: pxa2x0_ac97.c,v 1.15 2019/03/16 12:09:56 isaki Exp $ */
/*
* Copyright (c) 2003, 2005 Wasabi Systems, Inc.
@@ -156,34 +156,25 @@
static void acu_get_locks(void *, kmutex_t **, kmutex_t **);
struct audio_hw_if acu_hw_if = {
- acu_open,
Home |
Main Index |
Thread Index |
Old Index