From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandru Ardelean Subject: [PATCH 05/16] ALSA: oxygen: use new match_string() helper/macro Date: Wed, 8 May 2019 14:28:31 +0300 Message-ID: <20190508112842.11654-7-alexandru.ardelean@analog.com> References: <20190508112842.11654-1-alexandru.ardelean@analog.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190508112842.11654-1-alexandru.ardelean@analog.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-pm@vger.kernel.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, devel@driverdev.osuosl.org, linux-usb@vger.kernel.org, kvm@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-mtd@lists.infradead.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, alsa-devel@alsa-project.org Cc: gregkh@linuxfoundation.org, Alexandru Ardelean , andriy.shevchenko@linux.intel.com List-Id: linux-ide@vger.kernel.org The change is purely cosmetic at this point in time, but it does highlight the change done in lib/string.c for match_string(). Particularly for this change, a control mode can be removed/added at a different index/enum-value, and the match_string() helper will continue until the end of the array and ignore the NULL. Signed-off-by: Alexandru Ardelean --- sound/pci/oxygen/oxygen_mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c index 13c2fb75fd71..961fd1cbc712 100644 --- a/sound/pci/oxygen/oxygen_mixer.c +++ b/sound/pci/oxygen/oxygen_mixer.c @@ -1086,7 +1086,7 @@ static int add_controls(struct oxygen *chip, err = snd_ctl_add(chip->card, ctl); if (err < 0) return err; - j = __match_string(known_ctl_names, CONTROL_COUNT, ctl->id.name); + j = match_string(known_ctl_names, ctl->id.name); if (j >= 0) { chip->controls[j] = ctl; ctl->private_free = oxygen_any_ctl_free; -- 2.17.1