linux-next: manual merge of the sound tree with the sound-asoc-fixes tree

From: Stephen Rothwell
Date: Thu Aug 17 2023 - 22:56:17 EST


Hi all,

Today's linux-next merge of the sound tree got a conflict in:

sound/soc/codecs/cs35l56.c

between commit:

897a6b5a030e ("ASoC: cs35l56: Read firmware uuid from a device property instead of _SUB")

from the sound-asoc-fixes tree and commit:

898673b905b9 ("ASoC: cs35l56: Move shared data into a common data structure")

from the sound tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc sound/soc/codecs/cs35l56.c
index fd06b9f9d496,19b6b4fbe5de..000000000000
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@@ -1353,22 -1017,26 +1016,22 @@@ static int cs35l56_dsp_init(struct cs35
return 0;
}

-static int cs35l56_acpi_get_name(struct cs35l56_private *cs35l56)
+static int cs35l56_get_firmware_uid(struct cs35l56_private *cs35l56)
{
- struct device *dev = cs35l56->dev;
- acpi_handle handle = ACPI_HANDLE(cs35l56->base.dev);
- const char *sub;
++ struct device *dev = cs35l56->base.dev;
+ const char *prop;
+ int ret;

- /* If there is no ACPI_HANDLE, there is no ACPI for this system, return 0 */
- if (!handle)
+ ret = device_property_read_string(dev, "cirrus,firmware-uid", &prop);
+ /* If bad sw node property, return 0 and fallback to legacy firmware path */
+ if (ret < 0)
return 0;

- sub = acpi_get_subsystem_id(handle);
- if (IS_ERR(sub)) {
- /* If bad ACPI, return 0 and fallback to legacy firmware path, otherwise fail */
- if (PTR_ERR(sub) == -ENODATA)
- return 0;
- else
- return PTR_ERR(sub);
- }
+ cs35l56->dsp.system_name = devm_kstrdup(dev, prop, GFP_KERNEL);
+ if (cs35l56->dsp.system_name == NULL)
+ return -ENOMEM;

- cs35l56->dsp.system_name = sub;
- dev_dbg(cs35l56->base.dev, "Subsystem ID: %s\n", cs35l56->dsp.system_name);
+ dev_dbg(dev, "Firmware UID: %s\n", cs35l56->dsp.system_name);

return 0;
}
@@@ -1405,14 -1074,14 +1069,14 @@@ int cs35l56_common_probe(struct cs35l56

ret = regulator_bulk_enable(ARRAY_SIZE(cs35l56->supplies), cs35l56->supplies);
if (ret != 0)
- return dev_err_probe(cs35l56->dev, ret, "Failed to enable supplies\n");
+ return dev_err_probe(cs35l56->base.dev, ret, "Failed to enable supplies\n");

- if (cs35l56->reset_gpio) {
+ if (cs35l56->base.reset_gpio) {
cs35l56_wait_min_reset_pulse();
- gpiod_set_value_cansleep(cs35l56->reset_gpio, 1);
+ gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 1);
}

- ret = cs35l56_acpi_get_name(cs35l56);
+ ret = cs35l56_get_firmware_uid(cs35l56);
if (ret != 0)
goto err;

@@@ -1594,12 -1198,14 +1193,12 @@@ void cs35l56_remove(struct cs35l56_priv
flush_workqueue(cs35l56->dsp_wq);
destroy_workqueue(cs35l56->dsp_wq);

- pm_runtime_suspend(cs35l56->dev);
- pm_runtime_disable(cs35l56->dev);
+ pm_runtime_suspend(cs35l56->base.dev);
+ pm_runtime_disable(cs35l56->base.dev);

- regcache_cache_only(cs35l56->regmap, true);
+ regcache_cache_only(cs35l56->base.regmap, true);

- gpiod_set_value_cansleep(cs35l56->reset_gpio, 0);
- kfree(cs35l56->dsp.system_name);
-
+ gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 0);
regulator_bulk_disable(ARRAY_SIZE(cs35l56->supplies), cs35l56->supplies);
}
EXPORT_SYMBOL_NS_GPL(cs35l56_remove, SND_SOC_CS35L56_CORE);

Attachment: pgpu7A3wMgEZo.pgp
Description: OpenPGP digital signature