From: Michał Mirosław Date: Fri, 1 Feb 2013 19:40:17 +0000 (+0100) Subject: regulator: show state for GPIO-controlled regulators X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=896b65f3453d434983969e3ee7c254f4f8ba1424;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git regulator: show state for GPIO-controlled regulators Signed-off-by: Michał Mirosław Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 278584302f2d..6b3550ab480f 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3208,7 +3208,7 @@ static int add_regulator_attributes(struct regulator_dev *rdev) if (status < 0) return status; } - if (ops->is_enabled) { + if (rdev->ena_gpio || ops->is_enabled) { status = device_create_file(dev, &dev_attr_state); if (status < 0) return status;