summaryrefslogtreecommitdiff
path: root/drivers/regulator/pwm-regulator.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-05 11:43:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-05 11:43:30 -0700
commitfe9e31383e9a271a9b404488704e00acd1747ee3 (patch)
tree2d44c657a87b6379705745b46862a92463285a9a /drivers/regulator/pwm-regulator.c
parentb88f55774f20c0c306e0a95d22ca9ab5f08187c7 (diff)
parent00ee929f9efcad925ed4118f8c2e8bceb9fe7373 (diff)
Merge tag 'regulator-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "This is an extremely quiet release for the regulator subsystem, it's all fairly minor fixes and cleanups plus a few new drivers and ddevice ID additions: - Support for MediaTek MT6380, Ricoh RC5T619 and ST Voltage Reference Buffers" * tag 'regulator-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (24 commits) regulator: Add support for stm32-vrefbuf regulator: Add STM32 Voltage Reference Buffer regulator: pv88090: Exception handling for out of bounds regulator: da9063: Return an error code on probe failure regulator: rn5t618: add RC5T619 PMIC support regulator: ltc3589: constify i2c_device_id regulator: fan53555: fix I2C device ids regulator: add fixes with MT6397 dt-bindings shouldn't reference driver regulator: add fixes with MT6323 dt-bindings shouldn't reference driver regulator: add fixes with MT6311 dt-bindings shouldn't reference driver regulator: Add document for MediaTek MT6380 regulator regulator: mt6380: Add support for MT6380 regulator: pwm-regulator: Remove unneeded gpiod NULL check regulator: core: fix a possible race in disable_work handling regulator: fan53555: Use of_device_get_match_data() to simplify probe regulator: of: regulator_of_get_init_data() missing of_node_get() regulator: pwm-regulator: fix example syntax regulator: Convert to using %pOF instead of full_name regulator: cpcap: Add OF mode mapping regulator: cpcap: Fix standby mode ...
Diffstat (limited to 'drivers/regulator/pwm-regulator.c')
-rw-r--r--drivers/regulator/pwm-regulator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
index 1b88e0e15a70..a2fd140eff81 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -122,8 +122,7 @@ static int pwm_regulator_enable(struct regulator_dev *dev)
{
struct pwm_regulator_data *drvdata = rdev_get_drvdata(dev);
- if (drvdata->enb_gpio)
- gpiod_set_value_cansleep(drvdata->enb_gpio, 1);
+ gpiod_set_value_cansleep(drvdata->enb_gpio, 1);
return pwm_enable(drvdata->pwm);
}
@@ -134,8 +133,7 @@ static int pwm_regulator_disable(struct regulator_dev *dev)
pwm_disable(drvdata->pwm);
- if (drvdata->enb_gpio)
- gpiod_set_value_cansleep(drvdata->enb_gpio, 0);
+ gpiod_set_value_cansleep(drvdata->enb_gpio, 0);
return 0;
}