summaryrefslogtreecommitdiff
path: root/sound/hda
diff options
context:
space:
mode:
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>2026-05-13 19:23:04 +0200
committerMark Brown <broonie@kernel.org>2026-05-21 12:30:08 +0100
commit910714d4e79ba654d8a4e8103bb624d4f62e57f8 (patch)
tree323e6ef853be0c3267c953a9bd3890f9e85a67fe /sound/hda
parent2e0389f3689c42091ec153beadc4056ede448a34 (diff)
ASoC: Use named initializers for arrays of i2c_device_data
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. The mentioned robustness is relevant for a planned change to struct i2c_device_id that replaces .driver_data by an anonymous union. While touching all these arrays, unify indention and usage of commas. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/ae2ff4898eb340bd8bcafb7b75443eb4a0ce3e76.1778692164.git.u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c4
-rw-r--r--sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c8
-rw-r--r--sound/hda/codecs/side-codecs/tas2781_hda_i2c.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c b/sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c
index e77495413c21..96d8cc6c2324 100644
--- a/sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/cs35l41_hda_i2c.c
@@ -39,8 +39,8 @@ static void cs35l41_hda_i2c_remove(struct i2c_client *clt)
}
static const struct i2c_device_id cs35l41_hda_i2c_id[] = {
- { "cs35l41-hda" },
- {}
+ { .name = "cs35l41-hda" },
+ { }
};
static const struct acpi_device_id cs35l41_acpi_hda_match[] = {
diff --git a/sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c b/sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c
index 1072f17385ac..e2f51612a73d 100644
--- a/sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/cs35l56_hda_i2c.c
@@ -51,10 +51,10 @@ static void cs35l56_hda_i2c_remove(struct i2c_client *clt)
}
static const struct i2c_device_id cs35l56_hda_i2c_id[] = {
- { "cs35l54-hda", 0x3554 },
- { "cs35l56-hda", 0x3556 },
- { "cs35l57-hda", 0x3557 },
- {}
+ { .name = "cs35l54-hda", .driver_data = 0x3554 },
+ { .name = "cs35l56-hda", .driver_data = 0x3556 },
+ { .name = "cs35l57-hda", .driver_data = 0x3557 },
+ { }
};
static const struct acpi_device_id cs35l56_acpi_hda_match[] = {
diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
index 67240ce184e1..d59110402c7a 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
@@ -791,8 +791,8 @@ static const struct dev_pm_ops tas2781_hda_pm_ops = {
};
static const struct i2c_device_id tas2781_hda_i2c_id[] = {
- { "tas2781-hda" },
- {}
+ { .name = "tas2781-hda" },
+ { }
};
static const struct acpi_device_id tas2781_acpi_hda_match[] = {