From d3ee6df21abd25718b12130f0ba266cb3f1db2fa Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 31 Jan 2018 05:41:51 -0600 Subject: modules-basics: add device tree to full example There are separate files showing the full vain example. They need to show the device tree compatibility as well. Signed-off-by: John Ogness --- kernel-devel/module-basics/vain_plat/vain_plat_4.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel-devel/module-basics/vain_plat/vain_plat_4.c b/kernel-devel/module-basics/vain_plat/vain_plat_4.c index 93a480a..e76901c 100644 --- a/kernel-devel/module-basics/vain_plat/vain_plat_4.c +++ b/kernel-devel/module-basics/vain_plat/vain_plat_4.c @@ -13,10 +13,16 @@ static int __devexit vain_plat_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id vain_match[] = { + { .compatible = "example,vain", }, + { /* end of table */ } +}; + static struct platform_driver vain_plat_driver = { .driver = { .name = "vain_plat", .owner = THIS_MODULE, + .of_match_table = vain_match, }, .probe = vain_plat_probe, .remove = __devexit_p(vain_plat_remove), -- cgit v1.2.3