]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: usb-audio: Convert to common field_{get,prep}() helpers
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Nov 2025 13:34:10 +0000 (14:34 +0100)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Mon, 24 Nov 2025 19:15:47 +0000 (14:15 -0500)
Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
sound/usb/mixer_quirks.c

index 713a8498b975e1acd010f00b7025f1e93e276646..6eee89cbc0867f2b874b3514487f403d37c70d36 100644 (file)
@@ -3311,12 +3311,6 @@ static int snd_bbfpro_controls_create(struct usb_mixer_interface *mixer)
 #define RME_DIGIFACE_REGISTER(reg, mask) (((reg) << 16) | (mask))
 #define RME_DIGIFACE_INVERT BIT(31)
 
-/* Nonconst helpers */
-#undef field_get
-#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
-#undef field_prep
-#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
-
 static int snd_rme_digiface_write_reg(struct snd_kcontrol *kcontrol, int item, u16 mask, u16 val)
 {
        struct usb_mixer_elem_list *list = snd_kcontrol_chip(kcontrol);