Skip to content

Commit b191816

Browse files
Stefan Bindingbroonie
authored andcommitted
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: 1d44a30 ("ASoC: cs35l41: Fallback to using HID for system_name if no SUB is available") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: André Almeida <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ccc8480 commit b191816

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sound/soc/codecs/cs35l41.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,7 @@ static int cs35l41_dsp_init(struct cs35l41_private *cs35l41)
11481148
return ret;
11491149
}
11501150

1151+
#ifdef CONFIG_ACPI
11511152
static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
11521153
{
11531154
struct acpi_device *adev = ACPI_COMPANION(cs35l41->dev);
@@ -1180,6 +1181,12 @@ static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
11801181

11811182
return 0;
11821183
}
1184+
#else
1185+
static int cs35l41_acpi_get_name(struct cs35l41_private *cs35l41)
1186+
{
1187+
return 0;
1188+
}
1189+
#endif /* CONFIG_ACPI */
11831190

11841191
int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg *hw_cfg)
11851192
{

0 commit comments

Comments
 (0)