提交 8b298fb7 编写于 作者: F Fabio Estevam 提交者: Jonathan Cameron

iio: adc: ad7766: Remove unneeded gpiod NULL check

The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.
Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 50db2cd4
......@@ -103,8 +103,7 @@ static int ad7766_preenable(struct iio_dev *indio_dev)
return ret;
}
if (ad7766->pd_gpio)
gpiod_set_value(ad7766->pd_gpio, 0);
gpiod_set_value(ad7766->pd_gpio, 0);
return 0;
}
......@@ -113,8 +112,7 @@ static int ad7766_postdisable(struct iio_dev *indio_dev)
{
struct ad7766 *ad7766 = iio_priv(indio_dev);
if (ad7766->pd_gpio)
gpiod_set_value(ad7766->pd_gpio, 1);
gpiod_set_value(ad7766->pd_gpio, 1);
/*
* The PD pin is synchronous to the clock, so give it some time to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册