mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 01:13:11 +00:00
iio: pressure: bmp280: Explicitly mark GPIO optional
Show by using a corresponding API call that GPIO is optional. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
committed by
Jonathan Cameron
parent
6085102c49
commit
df6e71256c
@@ -1066,9 +1066,9 @@ int bmp280_common_probe(struct device *dev,
|
||||
usleep_range(data->start_up_time, data->start_up_time + 100);
|
||||
|
||||
/* Bring chip out of reset if there is an assigned GPIO line */
|
||||
gpiod = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
|
||||
gpiod = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
|
||||
/* Deassert the signal */
|
||||
if (!IS_ERR(gpiod)) {
|
||||
if (gpiod) {
|
||||
dev_info(dev, "release reset\n");
|
||||
gpiod_set_value(gpiod, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user