From 715159314dfafee66e6deb50b4e3431539a919d8 Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Mon, 20 Oct 2025 16:54:54 +0100 Subject: [PATCH] ASoC: SDCA: Rename SoundWire struct device variables 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 Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20251020155512.353774-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown --- sound/soc/sdca/sdca_functions.c | 6 +++--- sound/soc/sdca/sdca_interrupts.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c index 13f68f7b6dd6a..5f76ff4345ff5 100644 --- a/sound/soc/sdca/sdca_functions.c +++ b/sound/soc/sdca/sdca_functions.c @@ -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; } diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c index 79bf3042f57d4..1926c0846846f 100644 --- a/sound/soc/sdca/sdca_interrupts.c +++ b/sound/soc/sdca/sdca_interrupts.c @@ -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; } -- 2.47.3