summaryrefslogtreecommitdiff
path: root/sound/hda
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2024-08-19 08:55:46 +0800
committerMark Brown <broonie@kernel.org>2024-08-19 12:25:51 +0100
commitb27404b2bbf951a11500525dea15681cc970226c (patch)
tree45dd90ff1db4e8fe6e6671f1ad409c04284dc942 /sound/hda
parentd08ea4193a72c5e3090240872ff7ed60a70716e6 (diff)
ALSA/ASoC/SoundWire: Intel: use single definition for SDW_INTEL_MAX_LINKS
The definitions are currently duplicated in intel-sdw-acpi.c and sof_sdw.c. Move the definition to the sdw_intel.h header, and change the prefix to make it Intel-specific. No functionality change in this patch. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240819005548.5867-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/intel-sdw-acpi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/hda/intel-sdw-acpi.c b/sound/hda/intel-sdw-acpi.c
index f3b2a610df23..04d6b6beabca 100644
--- a/sound/hda/intel-sdw-acpi.c
+++ b/sound/hda/intel-sdw-acpi.c
@@ -17,7 +17,6 @@
#include <linux/string.h>
#define SDW_LINK_TYPE 4 /* from Intel ACPI documentation */
-#define SDW_MAX_LINKS 4
static int ctrl_link_mask;
module_param_named(sdw_link_mask, ctrl_link_mask, int, 0444);
@@ -87,9 +86,9 @@ sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
}
/* Check count is within bounds */
- if (count > SDW_MAX_LINKS) {
+ if (count > SDW_INTEL_MAX_LINKS) {
dev_err(&adev->dev, "Link count %d exceeds max %d\n",
- count, SDW_MAX_LINKS);
+ count, SDW_INTEL_MAX_LINKS);
return -EINVAL;
}