aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuodong Xu <guodong.xu@linaro.org>2017-06-07 03:06:04 -0400
committerMark Brown <broonie@kernel.org>2017-06-07 15:25:49 -0400
commita8ea49d7f589fac1994a3b0af59f25cb284f3eb6 (patch)
treed24178167094cc8292456341bb70672996fde921
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
regulator: hi6421: Describe consumed platform device
The hi6421-regulator driver consumes a similarly named platform device. Adding that to the module device table, allows modprobe to locate this driver once the device is created. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/hi6421-regulator.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/regulator/hi6421-regulator.c b/drivers/regulator/hi6421-regulator.c
index 62c5f5445d44..259c3a865ac6 100644
--- a/drivers/regulator/hi6421-regulator.c
+++ b/drivers/regulator/hi6421-regulator.c
@@ -621,7 +621,14 @@ static int hi6421_regulator_probe(struct platform_device *pdev)
621 return 0; 621 return 0;
622} 622}
623 623
624static const struct platform_device_id hi6421_regulator_table[] = {
625 { .name = "hi6421-regulator" },
626 {},
627};
628MODULE_DEVICE_TABLE(platform, hi6421_regulator_table);
629
624static struct platform_driver hi6421_regulator_driver = { 630static struct platform_driver hi6421_regulator_driver = {
631 .id_table = hi6421_regulator_table,
625 .driver = { 632 .driver = {
626 .name = "hi6421-regulator", 633 .name = "hi6421-regulator",
627 }, 634 },