HardenedBSD/sys/arm/allwinner
Christos Margiolis 516a9c0212 sound: Make device registration more intuitive
The way a sound driver currently registers to sound(4) is using the
following sequence of function calls:

1. pcm_register() to initialize snddev_info.
2. pcm_addchan() calls to create the device's primary channels.
3. pcm_setstatus() to do the final setup.

While using 3 different functions in a specific order might not be very
elegant, this pattern cannot be easily avoided. However, pcm_register()
and pcm_setstatus() are especially confusing, since one would
intuitively expect:

1. pcm_register() to actually do the registration, as opposed to a basic
   initialization.
2. pcm_setstatus() to, as the name suggests, set some kind of status, as
   opposed to finalizing the registration.

This patch renames pcm_register() to pcm_init(), and pcm_setstatus() to
pcm_register(). Drivers are modified accordingly.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D47325
2024-11-03 20:02:49 +01:00
..
a10
a13
a20
a31
a33
a64
a83t
h3
h6
a10_ahci.c
a10_codec.c
a10_dmac.c
a10_dmac.h
a10_sramc.c
a10_sramc.h
a10_timer.c
a31_dmac.c
a33_codec.c
allwinner_pinctrl.h
aw_cir.c
aw_gmacclk.c
aw_gpio.c
aw_i2s.c
aw_machdep.c
aw_machdep.h
aw_mmc.c
aw_mmc.h
aw_mp.c
aw_mp.h
aw_nmi.c
aw_r_intc.c
aw_reset.c
aw_rsb.c
aw_rtc.c
aw_sid.c
aw_sid.h
aw_syscon.c
aw_thermal.c
aw_ts.c
aw_usb3phy.c
aw_usbphy.c
aw_wdog.c
aw_wdog.h
axp81x.c
axp209.c
axp209reg.h
files.allwinner
files.allwinner_up
if_awg.c
if_awgreg.h
if_emac.c
if_emacreg.h
std.allwinner
std.allwinner_up
sunxi_dma_if.m