mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
hwmon: (sht15) Use devm_regulator_get_optional()
Since the sht15 driver supports operation without an external vref regulator the driver should use the new devm_regulator_get_optional() to indicate that a stub regulator should not be provided. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
7d748971c0
commit
9e059bacec
1 changed files with 1 additions and 1 deletions
|
@ -957,7 +957,7 @@ static int sht15_probe(struct platform_device *pdev)
|
|||
* If a regulator is available,
|
||||
* query what the supply voltage actually is!
|
||||
*/
|
||||
data->reg = devm_regulator_get(data->dev, "vcc");
|
||||
data->reg = devm_regulator_get_optional(data->dev, "vcc");
|
||||
if (!IS_ERR(data->reg)) {
|
||||
int voltage;
|
||||
|
||||
|
|
Loading…
Reference in a new issue