industrialio-buffer.c (d9a625744ed0e452f5c495cd8c51eed4b6623a4c) | industrialio-buffer.c (3e3d11b2e43b9a967d98261250c19636b893b7ed) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* The industrial I/O core 3 * 4 * Copyright (c) 2008 Jonathan Cameron 5 * 6 * Handling of buffer allocation / resizing. 7 * 8 * Things to look at here. --- 433 unchanged lines hidden (view full) --- 442 443 ret = __iio_add_chan_devattr("index", 444 chan, 445 &iio_show_scan_index, 446 NULL, 447 0, 448 IIO_SEPARATE, 449 &indio_dev->dev, | 1// SPDX-License-Identifier: GPL-2.0-only 2/* The industrial I/O core 3 * 4 * Copyright (c) 2008 Jonathan Cameron 5 * 6 * Handling of buffer allocation / resizing. 7 * 8 * Things to look at here. --- 433 unchanged lines hidden (view full) --- 442 443 ret = __iio_add_chan_devattr("index", 444 chan, 445 &iio_show_scan_index, 446 NULL, 447 0, 448 IIO_SEPARATE, 449 &indio_dev->dev, |
450 buffer, |
|
450 &buffer->scan_el_dev_attr_list); 451 if (ret) 452 return ret; 453 attrcount++; 454 ret = __iio_add_chan_devattr("type", 455 chan, 456 &iio_show_fixed_type, 457 NULL, 458 0, 459 0, 460 &indio_dev->dev, | 451 &buffer->scan_el_dev_attr_list); 452 if (ret) 453 return ret; 454 attrcount++; 455 ret = __iio_add_chan_devattr("type", 456 chan, 457 &iio_show_fixed_type, 458 NULL, 459 0, 460 0, 461 &indio_dev->dev, |
462 buffer, |
|
461 &buffer->scan_el_dev_attr_list); 462 if (ret) 463 return ret; 464 attrcount++; 465 if (chan->type != IIO_TIMESTAMP) 466 ret = __iio_add_chan_devattr("en", 467 chan, 468 &iio_scan_el_show, 469 &iio_scan_el_store, 470 chan->scan_index, 471 0, 472 &indio_dev->dev, | 463 &buffer->scan_el_dev_attr_list); 464 if (ret) 465 return ret; 466 attrcount++; 467 if (chan->type != IIO_TIMESTAMP) 468 ret = __iio_add_chan_devattr("en", 469 chan, 470 &iio_scan_el_show, 471 &iio_scan_el_store, 472 chan->scan_index, 473 0, 474 &indio_dev->dev, |
475 buffer, |
|
473 &buffer->scan_el_dev_attr_list); 474 else 475 ret = __iio_add_chan_devattr("en", 476 chan, 477 &iio_scan_el_ts_show, 478 &iio_scan_el_ts_store, 479 chan->scan_index, 480 0, 481 &indio_dev->dev, | 476 &buffer->scan_el_dev_attr_list); 477 else 478 ret = __iio_add_chan_devattr("en", 479 chan, 480 &iio_scan_el_ts_show, 481 &iio_scan_el_ts_store, 482 chan->scan_index, 483 0, 484 &indio_dev->dev, |
485 buffer, |
|
482 &buffer->scan_el_dev_attr_list); 483 if (ret) 484 return ret; 485 attrcount++; 486 ret = attrcount; 487 return ret; 488} 489 --- 1092 unchanged lines hidden --- | 486 &buffer->scan_el_dev_attr_list); 487 if (ret) 488 return ret; 489 attrcount++; 490 ret = attrcount; 491 return ret; 492} 493 --- 1092 unchanged lines hidden --- |