ad7303.c (1136fa0c07de570dc17858745af8be169d1440ba) | ad7303.c (74f582ec127e3b10aec71e8d15f1c14b0f0481ec) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * AD7303 Digital to analog converters driver 4 * 5 * Copyright 2013 Analog Devices Inc. 6 */ 7 8#include <linux/err.h> --- 63 unchanged lines hidden (view full) --- 72static ssize_t ad7303_write_dac_powerdown(struct iio_dev *indio_dev, 73 uintptr_t private, const struct iio_chan_spec *chan, const char *buf, 74 size_t len) 75{ 76 struct ad7303_state *st = iio_priv(indio_dev); 77 bool pwr_down; 78 int ret; 79 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * AD7303 Digital to analog converters driver 4 * 5 * Copyright 2013 Analog Devices Inc. 6 */ 7 8#include <linux/err.h> --- 63 unchanged lines hidden (view full) --- 72static ssize_t ad7303_write_dac_powerdown(struct iio_dev *indio_dev, 73 uintptr_t private, const struct iio_chan_spec *chan, const char *buf, 74 size_t len) 75{ 76 struct ad7303_state *st = iio_priv(indio_dev); 77 bool pwr_down; 78 int ret; 79 |
80 ret = strtobool(buf, &pwr_down); | 80 ret = kstrtobool(buf, &pwr_down); |
81 if (ret) 82 return ret; 83 84 mutex_lock(&st->lock); 85 86 if (pwr_down) 87 st->config |= AD7303_CFG_POWER_DOWN(chan->channel); 88 else --- 201 unchanged lines hidden --- | 81 if (ret) 82 return ret; 83 84 mutex_lock(&st->lock); 85 86 if (pwr_down) 87 st->config |= AD7303_CFG_POWER_DOWN(chan->channel); 88 else --- 201 unchanged lines hidden --- |