lkml.org 
[lkml]   [2021]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/3] ata: pata_rb532: Add device tree support
Date
Make driver also available via device tree binding.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
drivers/ata/pata_rb532_cf.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index 529ba28f471f..93d839ab9654 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -162,11 +162,20 @@ static int rb532_pata_driver_remove(struct platform_device *pdev)
return 0;
}

+#ifdef CONFIG_OF
+static const struct of_device_id pata_rb532_match[] = {
+ { .compatible = "mikrotik,rb532-pata", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, pata_rb532_match);
+#endif
+
static struct platform_driver rb532_pata_platform_driver = {
.probe = rb532_pata_driver_probe,
.remove = rb532_pata_driver_remove,
.driver = {
.name = DRV_NAME,
+ .of_match_table = of_match_ptr(pata_rb532_match),
},
};

--
2.29.2
\
 
 \ /
  Last update: 2021-04-28 18:34    [W:0.047 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site