]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
tools: iio: generic_buffer: Fix generic scale extraction
authorIrina Tirdea <irina.tirdea@intel.com>
Fri, 27 Mar 2015 11:53:00 +0000 (13:53 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 28 Mar 2015 11:01:49 +0000 (11:01 +0000)
commitd9d7b990473889a17b0f54e860a65b141733799c
treec9d677ae26b93cd674dc02f5acbe8fcd2d0dd0be
parent8ea06893e66d03dc567845d65b42812efd71b9f3
tools: iio: generic_buffer: Fix generic scale extraction

When using generic_buffer to read data, the scale is not properly
detected for scale shared by type. This is caused by a problem
with the generation of generic name out of the full name.
E.g.: for current->name in_accel_z, the extracted generic name
is "in" (when it should be "in_accel"). This is used in generic_buffer
to generate scale and offset paths (in_accel_scale).

Consider the in_ or out_ prefix when extracting the generic name
from the full name.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
tools/iio/iio_utils.c