]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SDCA: Rename SoundWire struct device variables
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 20 Oct 2025 15:54:54 +0000 (16:54 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Oct 2025 15:31:11 +0000 (15:31 +0000)
The SDCA core processes two different struct device's at various times,
usually it is processing the struct device associated with an individual
SDCA Function driver. However, there are times that it is processing the
struct device associated with the actual SoundWire peripheral, usually
the parent of the Function device.

To ensure this distinction remains clear in the code, rename the variable
when handling the actual SoundWire device to sdev.

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/20251020155512.353774-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sdca/sdca_functions.c
sound/soc/sdca/sdca_interrupts.c

index 13f68f7b6dd6aff6ba1b07be8e48faa3a9209f05..5f76ff4345ff5059928b640ff82ee6ca78b83460 100644 (file)
@@ -179,11 +179,11 @@ static int find_sdca_function(struct acpi_device *adev, void *data)
  */
 void sdca_lookup_functions(struct sdw_slave *slave)
 {
-       struct device *dev = &slave->dev;
-       struct acpi_device *adev = to_acpi_device_node(dev->fwnode);
+       struct device *sdev = &slave->dev;
+       struct acpi_device *adev = to_acpi_device_node(sdev->fwnode);
 
        if (!adev) {
-               dev_info(dev, "no matching ACPI device found, ignoring peripheral\n");
+               dev_info(sdev, "no matching ACPI device found, ignoring peripheral\n");
                return;
        }
 
index 79bf3042f57d420a60a829d89663a600cc75218e..1926c0846846f18985b625ba214653b163733bdd 100644 (file)
@@ -400,7 +400,7 @@ EXPORT_SYMBOL_NS_GPL(sdca_irq_populate, "SND_SOC_SDCA");
 
 /**
  * sdca_irq_allocate - allocate an SDCA interrupt structure for a device
- * @dev: Device pointer against which things should be allocated.
+ * @sdev: Device pointer against which things should be allocated.
  * @regmap: regmap to be used for accessing the SDCA IRQ registers.
  * @irq: The interrupt number.
  *
@@ -411,30 +411,30 @@ EXPORT_SYMBOL_NS_GPL(sdca_irq_populate, "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 *dev,
+struct sdca_interrupt_info *sdca_irq_allocate(struct device *sdev,
                                              struct regmap *regmap, int irq)
 {
        struct sdca_interrupt_info *info;
        int ret;
 
-       info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
+       info = devm_kzalloc(sdev, sizeof(*info), GFP_KERNEL);
        if (!info)
                return ERR_PTR(-ENOMEM);
 
        info->irq_chip = sdca_irq_chip;
 
-       ret = devm_mutex_init(dev, &info->irq_lock);
+       ret = devm_mutex_init(sdev, &info->irq_lock);
        if (ret)
                return ERR_PTR(ret);
 
-       ret = devm_regmap_add_irq_chip(dev, regmap, irq, IRQF_ONESHOT, 0,
+       ret = devm_regmap_add_irq_chip(sdev, regmap, irq, IRQF_ONESHOT, 0,
                                       &info->irq_chip, &info->irq_data);
        if (ret) {
-               dev_err(dev, "failed to register irq chip: %d\n", ret);
+               dev_err(sdev, "failed to register irq chip: %d\n", ret);
                return ERR_PTR(ret);
        }
 
-       dev_dbg(dev, "registered on irq %d\n", irq);
+       dev_dbg(sdev, "registered on irq %d\n", irq);
 
        return info;
 }