]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Simplify rate_min/max and rates set up
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 08:53:38 +0000 (09:53 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 14:16:22 +0000 (15:16 +0100)
commitc9b01d8e3f21e8b67a99b61f34f7d963094299dd
tree8dfc92d9ad3b925f68f2e4a0f61f209ea235f0ba
parentced0f9df6fd9bbd4f48f2d7647b6bdb693f33367
ALSA: usb-audio: Simplify rate_min/max and rates set up

There are multiple places in format.c performing the similar code for
setting the rate_min, rate_max and rates fields.  This patch unifies
those in a helper function and calls it at the end of the parser phase
so that all rate_table entries have been already determined.

No functional changes, just a minor code refactoring.

Tested-by: Keith Milner <kamilner@superlative.org>
Tested-by: Dylan Robinson <dylan_robinson@motu.com>
Link: https://lore.kernel.org/r/20201123085347.19667-33-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/format.c