[SRU][R][PATCH v3 1/7] ASoC: SDCA: Rename sdca_irq_allocate() to include devm

Chris Chiu chris.chiu at canonical.com
Wed Sep 2 05:19:05 UTC 2026


From: Charles Keepax <ckeepax at opensource.cirrus.com>

BugLink: https://bugs.launchpad.net/bugs/2163215

Make it more clear sdca_irq_allocate() uses devm allocations by adding
it into the name.

Signed-off-by: Charles Keepax <ckeepax at opensource.cirrus.com>
Link: https://patch.msgid.link/20260721143636.361814-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie at kernel.org>
(backported from commit 4ecef577d1ceddaa906720c71c06672433aba318)
[ChrisChiu: Conflict in sdca_class.c due to missing regcache_cache_only()
 line in our branch. Resolved by keeping our context and applying the
 function rename from sdca_irq_allocate() to devm_sdca_irq_allocate().]
Signed-off-by: Chris Chiu <chris.chiu at canonical.com>
---
 include/sound/sdca_interrupts.h  | 5 +++--
 sound/soc/sdca/sdca_class.c      | 4 ++--
 sound/soc/sdca/sdca_interrupts.c | 8 ++++----
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/include/sound/sdca_interrupts.h b/include/sound/sdca_interrupts.h
index a515cc3df097..28fd44eb9334 100644
--- a/include/sound/sdca_interrupts.h
+++ b/include/sound/sdca_interrupts.h
@@ -86,8 +86,9 @@ int sdca_irq_populate(struct sdca_function_data *function,
 void sdca_irq_cleanup(struct device *dev,
 		      struct sdca_function_data *function,
 		      struct sdca_interrupt_info *info);
-struct sdca_interrupt_info *sdca_irq_allocate(struct device *dev,
-					      struct regmap *regmap, int irq);
+
+struct sdca_interrupt_info *devm_sdca_irq_allocate(struct device *dev,
+						   struct regmap *regmap, int irq);
 
 void sdca_irq_enable_early(struct sdca_function_data *function,
 			   struct sdca_interrupt_info *info);
diff --git a/sound/soc/sdca/sdca_class.c b/sound/soc/sdca/sdca_class.c
index 5def6ae2d99f..3048885ffe3f 100644
--- a/sound/soc/sdca/sdca_class.c
+++ b/sound/soc/sdca/sdca_class.c
@@ -155,8 +155,8 @@ static void class_boot_work(struct work_struct *work)
 	if (ret)
 		goto err;
 
-	drv->irq_info = sdca_irq_allocate(drv->dev, drv->dev_regmap,
-					  drv->sdw->irq);
+	drv->irq_info = devm_sdca_irq_allocate(drv->dev, drv->dev_regmap,
+					       drv->sdw->irq);
 	if (IS_ERR(drv->irq_info))
 		goto err;
 
diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c
index 5cdabf8ae9da..8a8d0c061053 100644
--- a/sound/soc/sdca/sdca_interrupts.c
+++ b/sound/soc/sdca/sdca_interrupts.c
@@ -583,7 +583,7 @@ void sdca_irq_cleanup(struct device *dev,
 EXPORT_SYMBOL_NS_GPL(sdca_irq_cleanup, "SND_SOC_SDCA");
 
 /**
- * sdca_irq_allocate - allocate an SDCA interrupt structure for a device
+ * devm_sdca_irq_allocate - allocate an SDCA interrupt structure for a device
  * @sdev: Device pointer against which things should be allocated.
  * @regmap: regmap to be used for accessing the SDCA IRQ registers.
  * @irq: The interrupt number.
@@ -595,8 +595,8 @@ EXPORT_SYMBOL_NS_GPL(sdca_irq_cleanup, "SND_SOC_SDCA");
  * Return: A pointer to the allocated sdca_interrupt_info struct, or an
  * error code.
  */
-struct sdca_interrupt_info *sdca_irq_allocate(struct device *sdev,
-					      struct regmap *regmap, int irq)
+struct sdca_interrupt_info *devm_sdca_irq_allocate(struct device *sdev,
+						   struct regmap *regmap, int irq)
 {
 	struct sdca_interrupt_info *info;
 	int ret, i;
@@ -625,7 +625,7 @@ struct sdca_interrupt_info *sdca_irq_allocate(struct device *sdev,
 
 	return info;
 }
-EXPORT_SYMBOL_NS_GPL(sdca_irq_allocate, "SND_SOC_SDCA");
+EXPORT_SYMBOL_NS_GPL(devm_sdca_irq_allocate, "SND_SOC_SDCA");
 
 static void irq_enable_flags(struct sdca_function_data *function,
 			     struct sdca_interrupt_info *info, bool early)
-- 
2.43.0




More information about the kernel-team mailing list