[PATCH v2 05/17] ASoC: simple-amplifier: Remove CONFIG_OF flag and of_match_ptr()

Herve Codina
2026-04-29T07:44:24Z

The simple-amplifier Use CONFIG_OF flag for its of_device_id table
and of_match_ptr() when it assigns the table in the driver declaration.

This is no more needed. Drop them.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
sound/soc/codecs/simple-amplifier.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/simple-amplifier.c b/sound/soc/codecs/simple-amplifier.c
index 5b44bcfef49e..215318ff62fc 100644
--- a/sound/soc/codecs/simple-amplifier.c
+++ b/sound/soc/codecs/simple-amplifier.c
@@ -86,19 +86,17 @@ static int simple_amp_probe(struct platform_device *pdev)
NULL, 0);
}

-#ifdef CONFIG_OF
static const struct of_device_id simple_amp_ids[] = {
{ .compatible = "dioo,dio2125", },
{ .compatible = "simple-audio-amplifier", },
{ }
};
MODULE_DEVICE_TABLE(of, simple_amp_ids);
-#endif

static struct platform_driver simple_amp_driver = {
.driver = {
.name = "simple-amplifier",
- .of_match_table = of_match_ptr(simple_amp_ids),
+ .of_match_table = simple_amp_ids,
},
.probe = simple_amp_probe,
};
--
2.53.0