[PATCH 13/16] mfd/db8500-prcmu: Add Device Tree support

Lee Jones lee.jones at linaro.org
Tue Apr 17 06:44:05 EDT 2012


Here we see the db8500-prcmu driver obtain DT support. In its
current state, all we have to do is offer a matching compatible
node and the driver will register and initialise correctly.

Signed-off-by: Lee Jones <lee.jones at linaro.org>
---
 drivers/mfd/db8500-prcmu.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 839e70b..3c2e4a9 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -2992,11 +2992,16 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
 no_irq_return:
 	return err;
 }
+static const struct of_device_id db8500_prcmu_match[] = {
+	{ .compatible = "stericsson,db8500-prcmu"},
+	{ },
+};
 
 static struct platform_driver db8500_prcmu_driver = {
 	.driver = {
 		.name = "db8500-prcmu",
 		.owner = THIS_MODULE,
+		.of_match_table = db8500_prcmu_match,
 	},
 	.probe = db8500_prcmu_probe,
 };
-- 
1.7.9.1




More information about the linux-arm-kernel mailing list