Skip to content

Commit

Permalink
ASoC: cs35l41: Fix acpi_device_hid() not found
Browse files Browse the repository at this point in the history
Function acpi_device_hid() is only defined if CONFIG_ACPI is set.
Use #ifdef CONFIG_ACPI to ensure that cs35l41 driver only calls this
function is CONFIG_ACPI is define.

Fixes: 1d44a30 ("ASoC: cs35l41: Fallback to using HID for system_name if no SUB is available")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502090100.SbXmGFqs-lkp@intel.com/

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Link: https://patch.msgid.link/20250210163256.1722350-1-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Stefan Binding authored and Mark Brown committed Feb 10, 2025
1 parent ccc8480 commit b191816
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/soc/codecs/cs35l41.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ static int cs35l41_dsp_init(struct cs35l41_private *cs35l41)
return ret;
}

#ifdef CONFIG_ACPI
static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
{
struct acpi_device *adev = ACPI_COMPANION(cs35l41->dev);
Expand Down Expand Up @@ -1180,6 +1181,12 @@ static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)

return 0;
}
#else
static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
{
return 0;
}
#endif /* CONFIG_ACPI */

int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *hw_cfg)
{
Expand Down

0 comments on commit b191816

Please sign in to comment.