[PATCH v1 2/4] ASoC: renesas: fsi: Simplify driver_data handling

From: Uwe Kleine-König (The Capable Hub)

Date: Thu May 28 2026 - 05:17:37 EST


Instead of hiding the fsi_core struct for the only supported (non-of)
device behind an abstraction for multi-device support, hardcode the used
pointer which gets rid of (open-coded) platform_get_device_id() and two
casts.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
sound/soc/renesas/fsi.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/renesas/fsi.c b/sound/soc/renesas/fsi.c
index 8cbd7acc26f4..efd1447eacb9 100644
--- a/sound/soc/renesas/fsi.c
+++ b/sound/soc/renesas/fsi.c
@@ -1905,8 +1905,8 @@ static const struct of_device_id fsi_of_match[] = {
MODULE_DEVICE_TABLE(of, fsi_of_match);

static const struct platform_device_id fsi_id_table[] = {
- { "sh_fsi", (kernel_ulong_t)&fsi1_core },
- {},
+ { .name = "sh_fsi" },
+ { }
};
MODULE_DEVICE_TABLE(platform, fsi_id_table);

@@ -1929,9 +1929,7 @@ static int fsi_probe(struct platform_device *pdev)
fsi_of_parse("fsia", np, &info.port_a, &pdev->dev);
fsi_of_parse("fsib", np, &info.port_b, &pdev->dev);
} else {
- const struct platform_device_id *id_entry = pdev->id_entry;
- if (id_entry)
- core = (struct fsi_core *)id_entry->driver_data;
+ core = &fsi1_core;

if (pdev->dev.platform_data)
memcpy(&info, pdev->dev.platform_data, sizeof(info));
--
2.47.3