mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernel
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: 8c4c216db8 ("ALSA: hda: cs35l41: Add config table to support many laptops without _DSD")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Stefan Binding <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
committed by
Takashi Iwai
parent
ed7326a24a
commit
916d051730
@@ -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)
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user