Re: [PATCH 4/8] iio:magnetometer:bmc150_magn: replace magic value

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

 



On 17/07/15 09:52, Hartmut Knaack wrote:
> Construct the scanmask using its descriptive axis names (as used in
> iio_chan_spec) instead of a 'magic' value.
> 
> Signed-off-by: Hartmut Knaack <knaack.h@xxxxxx>
Applied to the togreg branch of iio.git, pushed out as
testing for the autobuilders to play with it.

Thanks,

Jonathan
> ---
> Does this look better?
Certainly slightly clearer what is going on.
> 
>  drivers/iio/magnetometer/bmc150_magn.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
> index 7da4ce9409e8..f1b6a4dc40ea 100644
> --- a/drivers/iio/magnetometer/bmc150_magn.c
> +++ b/drivers/iio/magnetometer/bmc150_magn.c
> @@ -651,7 +651,9 @@ static const struct iio_info bmc150_magn_info = {
>  	.driver_module = THIS_MODULE,
>  };
>  
> -static const unsigned long bmc150_magn_scan_masks[] = {0x07, 0};
> +static const unsigned long bmc150_magn_scan_masks[] = {
> +					BIT(AXIS_X) | BIT(AXIS_Y) | BIT(AXIS_Z),
> +					0};
>  
>  static irqreturn_t bmc150_magn_trigger_handler(int irq, void *p)
>  {
> 

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