mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
ASoC: codecs: jz4740: Add support for devicetree
Add support for probing the driver from devicetree. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
06a334ae98
commit
030a79e977
@ -346,10 +346,19 @@ static int jz4740_codec_probe(struct platform_device *pdev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
static const struct of_device_id jz4740_codec_of_matches[] = {
|
||||||
|
{ .compatible = "ingenic,jz4740-codec", },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, jz4740_codec_of_matches);
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct platform_driver jz4740_codec_driver = {
|
static struct platform_driver jz4740_codec_driver = {
|
||||||
.probe = jz4740_codec_probe,
|
.probe = jz4740_codec_probe,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "jz4740-codec",
|
.name = "jz4740-codec",
|
||||||
|
.of_match_table = of_match_ptr(jz4740_codec_of_matches),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user