Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: cs35l56: Suppress pointless warning about number of GPIO pulls

In cs35l56_process_xu_onchip_speaker_id() the warning that the number
of pulls != number of GPIOs should only be printed if pulls are defined.

Pull settings are optional because there would normally be an external
resistor providing the pull. The warning would still be true if pulls
are not defined, but in that case is just log noise.

While we're changing that block of code, also fix the indenting of the
arguments to the dev_warn().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260226113511.1768838-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Richard Fitzgerald and committed by
Mark Brown
ca5056f5 fd13fc70

+2 -2
+2 -2
sound/soc/codecs/cs35l56.c
··· 1625 1625 if (num_pulls < 0) 1626 1626 return num_pulls; 1627 1627 1628 - if (num_pulls != num_gpios) { 1628 + if (num_pulls && (num_pulls != num_gpios)) { 1629 1629 dev_warn(cs35l56->base.dev, "%s count(%d) != %s count(%d)\n", 1630 - pull_name, num_pulls, gpio_name, num_gpios); 1630 + pull_name, num_pulls, gpio_name, num_gpios); 1631 1631 } 1632 1632 1633 1633 ret = cs35l56_check_and_save_onchip_spkid_gpios(&cs35l56->base,