]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: SDCA: Add flag for unused IRQs
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 24 Jun 2025 12:28:42 +0000 (13:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:01 +0000 (18:41 +0200)
[ Upstream commit 775f5729b47d8737f4f98e0141f61b3358245398 ]

Zero is a valid SDCA IRQ interrupt position so add a special value to
indicate that the IRQ is not used.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/sound/sdca_function.h
sound/soc/sdca/sdca_functions.c

index eaedb54a83227b832c83905a2611f6938ad78d15..b43bda42eeca60136610ecc4987fc514c069457f 100644 (file)
@@ -16,6 +16,8 @@ struct device;
 struct sdca_entity;
 struct sdca_function_desc;
 
+#define SDCA_NO_INTERRUPT -1
+
 /*
  * The addressing space for SDCA relies on 7 bits for Entities, so a
  * maximum of 128 Entities per function can be represented.
index 28e9e6de6d5dbafd2c2cde30d7ff102510744f96..050f7338aca95a146713fc04a6d4f28ce1db37fb 100644 (file)
@@ -912,6 +912,8 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
                                       &tmp);
        if (!ret)
                control->interrupt_position = tmp;
+       else
+               control->interrupt_position = SDCA_NO_INTERRUPT;
 
        control->label = find_sdca_control_label(dev, entity, control);
        if (!control->label)