diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2022-10-19 19:14:18 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2022-10-19 19:14:18 +0000 |
commit | c74a7672b2392ed710d2732cd6f7026f00576c63 (patch) | |
tree | faa58053fc3d9e8eea2183e5cbcf72d6eef37ca5 /sys/dev/sbus | |
parent | 2592fe61d1d17a44ff5227aa3619a24bb2bc6cc5 (diff) |
Use C99 struct init for struct audio_hw_if
This audio(9) struct will lose a member, but drivers init their struct quite
inconsistently, most pre-C99 style.
Use C99 style everywhere, to get rid of all annoying differences and allow
for easy member removals/additions:
- don't change current order of members
- no explicit NULL members
- no comments or blank lines
- trailing comma in last member line
GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64.
macppc and alpha build-tested by miod
OK ratchov miod
Diffstat (limited to 'sys/dev/sbus')
-rw-r--r-- | sys/dev/sbus/cs4231.c | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/sys/dev/sbus/cs4231.c b/sys/dev/sbus/cs4231.c index bdf261390f5..9ef430ff6a2 100644 --- a/sys/dev/sbus/cs4231.c +++ b/sys/dev/sbus/cs4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4231.c,v 1.42 2022/08/29 06:08:04 jsg Exp $ */ +/* $OpenBSD: cs4231.c,v 1.43 2022/10/19 19:14:17 kn Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -152,28 +152,21 @@ int cs4231_trigger_input(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); const struct audio_hw_if cs4231_sa_hw_if = { - cs4231_open, - cs4231_close, - cs4231_set_params, - cs4231_round_blocksize, - cs4231_commit_settings, - 0, - 0, - 0, - 0, - cs4231_halt_output, - cs4231_halt_input, - 0, - 0, - cs4231_set_port, - cs4231_get_port, - cs4231_query_devinfo, - cs4231_alloc, - cs4231_free, - 0, - cs4231_get_props, - cs4231_trigger_output, - cs4231_trigger_input + .open = cs4231_open, + .close = cs4231_close, + .set_params = cs4231_set_params, + .round_blocksize = cs4231_round_blocksize, + .commit_settings = cs4231_commit_settings, + .halt_output = cs4231_halt_output, + .halt_input = cs4231_halt_input, + .set_port = cs4231_set_port, + .get_port = cs4231_get_port, + .query_devinfo = cs4231_query_devinfo, + .allocm = cs4231_alloc, + .freem = cs4231_free, + .get_props = cs4231_get_props, + .trigger_output = cs4231_trigger_output, + .trigger_input = cs4231_trigger_input, }; const struct cfattach audiocs_ca = { |