opnsense-src/sys/arm
Christos Margiolis 5aece3be1c 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

(cherry picked from commit 516a9c0212)
2024-11-05 22:45:01 +01:00
..
allwinner sound: Make device registration more intuitive 2024-11-05 22:45:01 +01:00
altera/socfpga sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
annapurna/alpine sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
arm kernel: Make some compile time constant variables const 2024-09-20 18:04:02 +08:00
broadcom/bcm2835 sound: Make device registration more intuitive 2024-11-05 22:45:01 +01:00
conf sys: add conf/std.debug, generic debugging options 2024-10-09 10:44:35 +02:00
freescale sound: Make device registration more intuitive 2024-11-05 22:45:01 +01:00
include intrng: Extract arm/arm64 IPI->PIC glue code 2024-09-07 00:58:28 +01:00
mv arm/mpic: remove empty pic_init_secondary() hook 2024-09-07 00:52:27 +01:00
nvidia arm: Convert drivers to use device_set_desc(f)() 2024-06-09 09:37:45 -04:00
qemu sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
qualcomm sys: Use the new arm_smccc_invoke macros 2024-10-21 15:03:27 +00:00
rockchip sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
ti arm ti: Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:18 +08:00
xilinx sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00