Skip to content

Commit 775f572

Browse files
charleskeepaxbroonie
authored andcommitted
ASoC: SDCA: Add flag for unused IRQs
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 <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 37d2aa6 commit 775f572

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

include/sound/sdca_function.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ struct device;
1717
struct sdca_entity;
1818
struct sdca_function_desc;
1919

20+
#define SDCA_NO_INTERRUPT -1
21+
2022
/*
2123
* The addressing space for SDCA relies on 7 bits for Entities, so a
2224
* maximum of 128 Entities per function can be represented.

sound/soc/sdca/sdca_functions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,8 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
912912
&tmp);
913913
if (!ret)
914914
control->interrupt_position = tmp;
915+
else
916+
control->interrupt_position = SDCA_NO_INTERRUPT;
915917

916918
control->label = find_sdca_control_label(dev, entity, control);
917919
if (!control->label)

0 commit comments

Comments
 (0)