summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-16 18:16:44 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-18 09:43:10 +0100
commit851960f4e8c9554b93402fab072acf243386fe42 (patch)
tree5e5f848c4db14cec7e325cfaf3366acf8705d54f /drivers/regulator/core.c
parent2787c15908a42dc3ee35e1a8037c634afe535b37 (diff)
downloadbarebox-851960f4e8c9554b93402fab072acf243386fe42.tar.gz
barebox-851960f4e8c9554b93402fab072acf243386fe42.tar.xz
regulator: Convert drivers to use struct regulator_desc
To simplify porting kernel code, port a very basic struct regulator_desc and convert all of the code to use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 39df980dcb..bcfbda62e3 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -52,10 +52,10 @@ static int regulator_enable_internal(struct regulator_internal *ri)
return 0;
}
- if (!ri->rdev->ops->enable)
+ if (!ri->rdev->desc->ops->enable)
return -ENOSYS;
- ret = ri->rdev->ops->enable(ri->rdev);
+ ret = ri->rdev->desc->ops->enable(ri->rdev);
if (ret)
return ret;
@@ -74,10 +74,10 @@ static int regulator_disable_internal(struct regulator_internal *ri)
if (!ri->enable_count)
return -EINVAL;
- if (!ri->rdev->ops->disable)
+ if (!ri->rdev->desc->ops->disable)
return -ENOSYS;
- ret = ri->rdev->ops->disable(ri->rdev);
+ ret = ri->rdev->desc->ops->disable(ri->rdev);
if (ret)
return ret;