From: Stefan Binding <sbinding@opensource.cirrus.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: <alsa-devel@alsa-project.org>, <linux-sound@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>,
"Stefan Binding" <sbinding@opensource.cirrus.com>,
kernel test robot <lkp@intel.com>
Subject: [PATCH v1 2/2] ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernel
Date: Tue, 19 Dec 2023 16:22:32 +0000 [thread overview]
Message-ID: <20231219162232.790358-3-sbinding@opensource.cirrus.com> (raw)
In-Reply-To: <20231219162232.790358-1-sbinding@opensource.cirrus.com>
If CONFIG_SPI is not set in the kernel, there is no point in trying
to set the chip selects. We can selectively compile it.
Fixes: 8c4c216db8fb ("ALSA: hda: cs35l41: Add config table to support many laptops without _DSD")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312192256.lJelQEoZ-lkp@intel.com/
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
---
sound/pci/hda/cs35l41_hda_property.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c
index 73b304e6c83c..194e1179a253 100644
--- a/sound/pci/hda/cs35l41_hda_property.c
+++ b/sound/pci/hda/cs35l41_hda_property.c
@@ -210,6 +210,8 @@ static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physde
if (cfg->bus == SPI) {
cs35l41->index = id;
+
+#if IS_ENABLED(CONFIG_SPI)
/*
* Manually set the Chip Select for the second amp <cs_gpio_index> in the node.
* This is only supported for systems with 2 amps, since we cannot expand the
@@ -249,6 +251,7 @@ static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physde
spi_setup(spi);
}
}
+#endif
} else {
if (cfg->num_amps > 2)
/*
--
2.34.1
next prev parent reply other threads:[~2023-12-19 16:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 16:22 [PATCH v1 0/2] Minor fixes for CS35L41 HDA Property driver Stefan Binding
2023-12-19 16:22 ` [PATCH v1 1/2] ALSA: hda: cs35l41: Do not allow uninitialised variables to be freed Stefan Binding
2023-12-19 16:22 ` Stefan Binding [this message]
2023-12-20 8:10 ` [PATCH v1 2/2] ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernel Takashi Iwai
2023-12-21 8:27 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231219162232.790358-3-sbinding@opensource.cirrus.com \
--to=sbinding@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=lkp@intel.com \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox