ASoC: cs35l41: Fix acpi_device_hid() not found
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: 1d44a30ae3
("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>
This commit is contained in:
parent
ccc8480d90
commit
b191816381
1 changed files with 7 additions and 0 deletions
|
@ -1148,6 +1148,7 @@ err_dsp:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(cs35l41->dev);
|
||||
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue