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>
This commit is contained in:
Richard Fitzgerald 2026-02-26 11:35:11 +00:00 committed by Mark Brown
parent fd13fc700e
commit ca5056f5a7
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1625,9 +1625,9 @@ static int cs35l56_process_xu_onchip_speaker_id(struct cs35l56_private *cs35l56,
if (num_pulls < 0)
return num_pulls;
if (num_pulls != num_gpios) {
if (num_pulls && (num_pulls != num_gpios)) {
dev_warn(cs35l56->base.dev, "%s count(%d) != %s count(%d)\n",
pull_name, num_pulls, gpio_name, num_gpios);
pull_name, num_pulls, gpio_name, num_gpios);
}
ret = cs35l56_check_and_save_onchip_spkid_gpios(&cs35l56->base,