On Wed, 03 Jan 2024 11:25:59 +0100,
Arnd Bergmann wrote:
>
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> When CONFIG_SPI is disabled, the driver produces unused-variable warning:
>
> sound/pci/hda/cs35l41_hda_property.c: In function 'generic_dsd_config':
> sound/pci/hda/cs35l41_hda_property.c:181:28: error: unused variable 'spi' [-Werror=unused-variable]
> 181 | struct spi_device *spi;
> | ^~~
> sound/pci/hda/cs35l41_hda_property.c:180:27: error: unused variable 'cs_gpiod' [-Werror=unused-variable]
> 180 | struct gpio_desc *cs_gpiod;
> | ^~~~~~~~
>
> Avoid these by turning the preprocessor contionals into equivalent C code,
> which also helps readability.
>
> Fixes: 916d051730ae ("ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernel")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Applied now. Thanks.
Takashi
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]