diff options
author | Jonathan Cameron | 2011-08-30 13:32:47 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-09-07 00:59:10 +0200 |
commit | 1aa042783251c27a93e31929c24647729db326d4 (patch) | |
tree | 137aba5136332c8c8ad7d2cdd5d194084751f0f5 /drivers/staging/iio/Documentation/generic_buffer.c | |
parent | staging: iio: squash chrdev handler remains into users. (diff) | |
download | kernel-qcow2-linux-1aa042783251c27a93e31929c24647729db326d4.tar.gz kernel-qcow2-linux-1aa042783251c27a93e31929c24647729db326d4.tar.xz kernel-qcow2-linux-1aa042783251c27a93e31929c24647729db326d4.zip |
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.c | 12 |
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 f82894f42d27..d58095321491 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; |