summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-01-12 18:26:05 (GMT)
committerMark Brown <broonie@kernel.org>2016-01-12 18:26:05 (GMT)
commit9fa295742d4f3064b1faf8fbbbcba21969ec9df6 (patch)
tree4f3ed706fdd36fbfbe8fb890e3f986ca76a0ae00 /drivers/regulator
parent353915f0b43fb156c3bf02d54d9f3dbdcbe66afe (diff)
parent70dc6daff090afaab588e800fca3db59bfac694e (diff)
downloadlinux-9fa295742d4f3064b1faf8fbbbcba21969ec9df6.tar.xz
Merge remote-tracking branch 'regulator/topic/core' into regulator-next
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c70017d..09af2aa 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2360,7 +2360,6 @@ static void regulator_disable_work(struct work_struct *work)
int regulator_disable_deferred(struct regulator *regulator, int ms)
{
struct regulator_dev *rdev = regulator->rdev;
- int ret;
if (regulator->always_on)
return 0;
@@ -2372,13 +2371,9 @@ int regulator_disable_deferred(struct regulator *regulator, int ms)
rdev->deferred_disables++;
mutex_unlock(&rdev->mutex);
- ret = queue_delayed_work(system_power_efficient_wq,
- &rdev->disable_work,
- msecs_to_jiffies(ms));
- if (ret < 0)
- return ret;
- else
- return 0;
+ queue_delayed_work(system_power_efficient_wq, &rdev->disable_work,
+ msecs_to_jiffies(ms));
+ return 0;
}
EXPORT_SYMBOL_GPL(regulator_disable_deferred);
@@ -3700,7 +3695,7 @@ static umode_t regulator_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int idx)
{
struct device *dev = kobj_to_dev(kobj);
- struct regulator_dev *rdev = container_of(dev, struct regulator_dev, dev);
+ struct regulator_dev *rdev = dev_to_rdev(dev);
const struct regulator_ops *ops = rdev->desc->ops;
umode_t mode = attr->mode;