From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbcEUTVs (ORCPT ); Sat, 21 May 2016 15:21:48 -0400 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:47212 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbcEUTVq (ORCPT ); Sat, 21 May 2016 15:21:46 -0400 Subject: Re: [PATCH] max44000: Remove scale from proximity To: Crestez Dan Leonard , linux-iio@vger.kernel.org References: Cc: linux-kernel@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Daniel Baluta From: Jonathan Cameron Message-ID: <1f6f8c36-e15b-8d4e-b6c8-bba3f8e53e49@kernel.org> Date: Sat, 21 May 2016 20:21:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/05/16 15:44, Crestez Dan Leonard wrote: > This is not implemented and doesn't really make sense because IIO > proximity is unit-less. > > Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale > sysfs entry won't appear. This fixes userspace tools like generic_buffer > which abort when reads returns an error. > Applied to the fixes-togreg-post-rc1 branch of iio.git. Thanks, Jonathan > Signed-off-by: Crestez Dan Leonard > --- > drivers/iio/light/max44000.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/iio/light/max44000.c b/drivers/iio/light/max44000.c > index e01e58a..f17cb2e 100644 > --- a/drivers/iio/light/max44000.c > +++ b/drivers/iio/light/max44000.c > @@ -147,7 +147,6 @@ static const struct iio_chan_spec max44000_channels[] = { > { > .type = IIO_PROXIMITY, > .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), > - .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), > .scan_index = MAX44000_SCAN_INDEX_PRX, > .scan_type = { > .sign = 'u', >