From 7ff3a4cc82e7d139ce2042d1235bf1a6faeaccb3 Mon Sep 17 00:00:00 2001 From: David Collins Date: Fri, 7 Oct 2016 11:52:47 -0700 Subject: [PATCH] regulator: correct name used in debug consumer regulator_get call Call rdev_get_name() to obtain the name to use in the debug consumer's regulator_get() call so that the debug consumer finds the correct regulator when the name differs in the constraints and desc structs. Change-Id: Id6a47467cd118c89c8f58d1120381d4c64f8efee CRs-Fixed: 1075693 Signed-off-by: David Collins --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 27a5deb1213e..80a9f0ee288b 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4223,7 +4223,7 @@ static void rdev_init_debugfs(struct regulator_dev *rdev) debugfs_create_file("consumers", 0444, rdev->debugfs, rdev, ®_consumers_fops); - reg = regulator_get(NULL, rdev->desc->name); + reg = regulator_get(NULL, rdev_get_name(rdev)); if (IS_ERR(reg) || reg == NULL) { pr_err("Error-Bad Function Input\n"); goto error;