summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/Documentation/generic_buffer.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-08-30 11:32:47 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-06 22:59:10 (GMT)
commit1aa042783251c27a93e31929c24647729db326d4 (patch)
tree137aba5136332c8c8ad7d2cdd5d194084751f0f5 /drivers/staging/iio/Documentation/generic_buffer.c
parent6356463cf4627f599547f0698853ef419b2d2f1d (diff)
downloadlinux-fsl-qoriq-1aa042783251c27a93e31929c24647729db326d4.tar.xz
staging: iio: push the main buffer chrdev down to the top level.
Sorry all, this one is very invasive, though the driver changes are just trivial interface fixes. Not all done yet. V2 - bring the sca3000 with us. V3 - fix ade7758 bugs in conversion. V4 - add ad5933 Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/Documentation/generic_buffer.c')
-rw-r--r--drivers/staging/iio/Documentation/generic_buffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/iio/Documentation/generic_buffer.c b/drivers/staging/iio/Documentation/generic_buffer.c
index f82894f..d580953 100644
--- a/drivers/staging/iio/Documentation/generic_buffer.c
+++ b/drivers/staging/iio/Documentation/generic_buffer.c
@@ -173,7 +173,7 @@ int main(int argc, char **argv)
return -1;
/* Find the device requested */
- dev_num = find_type_by_name(device_name, "device");
+ dev_num = find_type_by_name(device_name, "iio:device");
if (dev_num < 0) {
printf("Failed to find the %s\n", device_name);
ret = -ENODEV;
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
}
printf("iio device number being used is %d\n", dev_num);
- asprintf(&dev_dir_name, "%sdevice%d", iio_dir, dev_num);
+ asprintf(&dev_dir_name, "%siio:device%d", iio_dir, dev_num);
if (trigger_name == NULL) {
/*
* Build the trigger name. If it is device associated it's
@@ -212,6 +212,7 @@ int main(int argc, char **argv)
ret = build_channel_array(dev_dir_name, &infoarray, &num_channels);
if (ret) {
printf("Problem reading scan element information\n");
+ printf("diag %s\n", dev_dir_name);
goto error_free_triggername;
}
@@ -220,7 +221,8 @@ int main(int argc, char **argv)
* As we know that the lis3l02dq has only one buffer this may
* be built rather than found.
*/
- ret = asprintf(&buf_dir_name, "%sdevice%d:buffer0", iio_dir, dev_num);
+ ret = asprintf(&buf_dir_name,
+ "%siio:device%d/buffer", iio_dir, dev_num);
if (ret < 0) {
ret = -ENOMEM;
goto error_free_triggername;
@@ -251,9 +253,7 @@ int main(int argc, char **argv)
goto error_free_buf_dir_name;
}
- ret = asprintf(&buffer_access,
- "/dev/device%d:buffer0",
- dev_num);
+ ret = asprintf(&buffer_access, "/dev/iio:device%d", dev_num);
if (ret < 0) {
ret = -ENOMEM;
goto error_free_data;