aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-01-25 09:37:16 -0500
committerMark Brown <broonie@kernel.org>2016-01-27 10:29:07 -0500
commitabbf043b6508f6c90477a183b6975c269e913c7b (patch)
tree5f6ead852f7599e75deb108f3ce4f59a06bd1a34
parent288a89bf436fa3682742d41b2bc1b243ff2ded85 (diff)
regulator: mt6397: Add OF match table
The Documentation/devicetree/bindings/regulator/mt6397-regulator.txt doc mentions that a compatible "mediatek,mt6397-regulator" is required for the MT6397 device node but the driver doesn't provide a OF match table so the platform bus .match fallbacks to match using the driver name instead. This also means that module auto-loading is broken for this driver since the MFD driver that register the device, has a .of_compatible set so the platform .uevent callback reports a OF modalias that's not in the module. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/mt6397-regulator.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c
index 585f0399a36b..17a5b6c2d6a9 100644
--- a/drivers/regulator/mt6397-regulator.c
+++ b/drivers/regulator/mt6397-regulator.c
@@ -323,9 +323,16 @@ static const struct platform_device_id mt6397_platform_ids[] = {
323}; 323};
324MODULE_DEVICE_TABLE(platform, mt6397_platform_ids); 324MODULE_DEVICE_TABLE(platform, mt6397_platform_ids);
325 325
326static const struct of_device_id mt6397_of_match[] = {
327 { .compatible = "mediatek,mt6397-regulator", },
328 { /* sentinel */ },
329};
330MODULE_DEVICE_TABLE(of, mt6397_of_match);
331
326static struct platform_driver mt6397_regulator_driver = { 332static struct platform_driver mt6397_regulator_driver = {
327 .driver = { 333 .driver = {
328 .name = "mt6397-regulator", 334 .name = "mt6397-regulator",
335 .of_match_table = of_match_ptr(mt6397_of_match),
329 }, 336 },
330 .probe = mt6397_regulator_probe, 337 .probe = mt6397_regulator_probe,
331 .id_table = mt6397_platform_ids, 338 .id_table = mt6397_platform_ids,