[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170607103242.16008-3-enric.balletbo@collabora.com>
Date: Wed, 7 Jun 2017 12:32:41 +0200
From: Enric Balletbo i Serra <enric.balletbo@...labora.com>
To: devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-leds@...r.kernel.org, linux-input@...r.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Lee Jones <lee.jones@...aro.org>,
Daniel Thompson <daniel.thompson@...aro.org>,
Jingoo Han <jingoohan1@...il.com>,
Richard Purdie <rpurdie@...ys.net>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Pavel Machek <pavel@....cz>, Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Russell King <linux@...linux.org.uk>,
Tony Lindgren <tony@...mide.com>, javier@...hile0.org
Subject: [PATCH 3/4] regulator: tps65217: Fix module autoload for devices registered via OF
The driver doesn't have a OF device ID table and so if devices are
registered via OF, module autoloading won't work.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
---
drivers/regulator/tps65217-regulator.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index 5324dc9..2c05360 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -263,9 +263,16 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id tps65217_regulator_match_table[] = {
+ { .compatible = "ti,tps65217-pmic", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, tps65217_regulator_match_table);
+
static struct platform_driver tps65217_regulator_driver = {
.driver = {
.name = "tps65217-pmic",
+ .of_match_table = tps65217_regulator_match_table,
},
.probe = tps65217_regulator_probe,
};
--
2.9.3
Powered by blists - more mailing lists