Page MenuHomeFreeBSD

sound: Simplify feeder_getclass()
ClosedPublic

Authored by christos on Nov 3 2025, 3:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 13, 11:47 AM
Unknown Object (File)
Wed, Jan 7, 2:31 PM
Unknown Object (File)
Sun, Dec 28, 1:10 AM
Unknown Object (File)
Sun, Dec 28, 1:04 AM
Unknown Object (File)
Thu, Dec 25, 6:32 PM
Unknown Object (File)
Sat, Dec 20, 4:01 AM
Unknown Object (File)
Nov 24 2025, 3:27 AM
Unknown Object (File)
Nov 21 2025, 3:04 PM
Subscribers

Details

Summary

With the parameters we provide feeder_getclass(), the only thing we
really care about is the feeder's class type. We can simplify (and make
the code more readable) that by simply passing the type to
feeder_getclass(). Apart from being simpler, we can now also retire
feedertab_entry->desc and cmpdesc().

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/sound/pcm/feeder.c
59

Why is it "first" if there's only one?

sys/dev/sound/pcm/feeder.c
59

This function is called by the following sysinit:

SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register_root,
    &feeder_root_class);

This one is called before the other feeder sysinits. The check here is just to make sure that we enter this function for FEEDER_ROOT only.

This revision is now accepted and ready to land.Nov 4 2025, 12:49 PM
This revision was automatically updated to reflect the committed changes.