diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-10-16 17:30:11 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-10-16 17:30:11 +0200 |
| commit | ec57e2f0acb01710cd465bc04495ed03a9e0fea1 (patch) | |
| tree | 9f45889ba31b750f99fd3d0b625684d9b4cd4f17 /drivers/regulator/core.c | |
| parent | 4766ab5677a2842834f9bc4a21587256a811531c (diff) | |
| parent | 72a9c673636b779e370983fea08e40f97039b981 (diff) | |
| download | lwn-ec57e2f0acb01710cd465bc04495ed03a9e0fea1.tar.gz lwn-ec57e2f0acb01710cd465bc04495ed03a9e0fea1.zip | |
Merge branch 'x86/build' into locking/core, to pick up dependent patches and unify jump-label work
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/regulator/core.c')
| -rw-r--r-- | drivers/regulator/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index bb1324f93143..9577d8941846 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3161,7 +3161,7 @@ static inline int regulator_suspend_toggle(struct regulator_dev *rdev, if (!rstate->changeable) return -EPERM; - rstate->enabled = en; + rstate->enabled = (en) ? ENABLE_IN_SUSPEND : DISABLE_IN_SUSPEND; return 0; } @@ -4395,13 +4395,13 @@ regulator_register(const struct regulator_desc *regulator_desc, !rdev->desc->fixed_uV) rdev->is_switch = true; + dev_set_drvdata(&rdev->dev, rdev); ret = device_register(&rdev->dev); if (ret != 0) { put_device(&rdev->dev); goto unset_supplies; } - dev_set_drvdata(&rdev->dev, rdev); rdev_init_debugfs(rdev); /* try to resolve regulators supply since a new one was registered */ |
