industrialio-event.c (651a88798412e216f337d70181127e847f00a4b7) | industrialio-event.c (74f582ec127e3b10aec71e8d15f1c14b0f0481ec) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* Industrial I/O event handling 3 * 4 * Copyright (c) 2008 Jonathan Cameron 5 * 6 * Based on elements of hwmon and input subsystems. 7 */ 8 --- 260 unchanged lines hidden (view full) --- 269 const char *buf, 270 size_t len) 271{ 272 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 273 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 274 int ret; 275 bool val; 276 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* Industrial I/O event handling 3 * 4 * Copyright (c) 2008 Jonathan Cameron 5 * 6 * Based on elements of hwmon and input subsystems. 7 */ 8 --- 260 unchanged lines hidden (view full) --- 269 const char *buf, 270 size_t len) 271{ 272 struct iio_dev *indio_dev = dev_to_iio_dev(dev); 273 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); 274 int ret; 275 bool val; 276 |
277 ret = strtobool(buf, &val); | 277 ret = kstrtobool(buf, &val); |
278 if (ret < 0) 279 return ret; 280 281 ret = indio_dev->info->write_event_config(indio_dev, 282 this_attr->c, iio_ev_attr_type(this_attr), 283 iio_ev_attr_dir(this_attr), val); 284 285 return (ret < 0) ? ret : len; --- 312 unchanged lines hidden --- | 278 if (ret < 0) 279 return ret; 280 281 ret = indio_dev->info->write_event_config(indio_dev, 282 this_attr->c, iio_ev_attr_type(this_attr), 283 iio_ev_attr_dir(this_attr), val); 284 285 return (ret < 0) ? ret : len; --- 312 unchanged lines hidden --- |