Re: [PATCH] tools: iio: make scale and offset files optional

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

 



Joo Aun Saw schrieb am 23.07.2015 um 04:53:
> From: Joo Aun Saw <jasaw@xxxxxxxxxxx>
> 
> Make scale and offset optional by adding -ENOENT check as not all
> drivers implement them.
> 
> Signed-off-by: Joo Aun Saw <jasaw@xxxxxxxxxxx>
Acked-by: Hartmut Knaack <knaack.h@xxxxxx>
> ---
>  tools/iio/iio_utils.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
> index c3f9e37..1dcdf03 100644
> --- a/tools/iio/iio_utils.c
> +++ b/tools/iio/iio_utils.c
> @@ -487,7 +487,7 @@ int build_channel_array(const char *device_dir,
>  						       device_dir,
>  						       current->name,
>  						       current->generic_name);
> -			if (ret < 0)
> +			if ((ret < 0) && (ret != -ENOENT))
>  				goto error_cleanup_array;
>  
>  			ret = iioutils_get_param_float(&current->offset,
> @@ -495,7 +495,7 @@ int build_channel_array(const char *device_dir,
>  						       device_dir,
>  						       current->name,
>  						       current->generic_name);
> -			if (ret < 0)
> +			if ((ret < 0) && (ret != -ENOENT))
>  				goto error_cleanup_array;
>  
>  			ret = iioutils_get_type(&current->is_signed,
> 

--
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