[RFC 5/7] iio: generic_buffer: Use current_trigger_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a preferred alternative to 'current_trigger'.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@xxxxxxxxx>
---
 tools/iio/generic_buffer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c
index e8c3052..b23371a 100644
--- a/tools/iio/generic_buffer.c
+++ b/tools/iio/generic_buffer.c
@@ -582,12 +582,12 @@ int main(int argc, char **argv)
 		 * Set the device trigger to be the data ready trigger found
 		 * above
 		 */
-		ret = write_sysfs_string_and_verify("trigger/current_trigger",
-						    dev_dir_name,
-						    trigger_name);
+		ret = write_sysfs_int_and_verify("trigger/current_trigger_id",
+						 dev_dir_name,
+						 trig_num);
 		if (ret < 0) {
 			fprintf(stderr,
-				"Failed to write current_trigger file\n");
+				"Failed to write current_trigger_id file\n");
 			goto error;
 		}
 	}
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux