diff options
| author | John Ogness <john.ogness@linutronix.de> | 2018-01-31 05:41:51 -0600 |
|---|---|---|
| committer | John Ogness <john.ogness@linutronix.de> | 2018-02-20 14:58:35 +0100 |
| commit | d3ee6df21abd25718b12130f0ba266cb3f1db2fa (patch) | |
| tree | 1ecbc19b6a9129d6576ffeb8d1a1b3ccd8b6324f /kernel-devel | |
| parent | 0e7cb133ccdd77a66de18e095815737f5c4e3481 (diff) | |
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 <john.ogness@linutronix.de>
Diffstat (limited to 'kernel-devel')
| -rw-r--r-- | kernel-devel/module-basics/vain_plat/vain_plat_4.c | 6 |
1 files changed, 6 insertions, 0 deletions
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), |
