All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: linux-iio@vger.kernel.org, lorenzo.bianconi@redhat.com
Subject: Re: [PATCH] iio: imu: st_lsm6dsx: remove duplicated macro
Date: Sun, 5 Apr 2020 13:07:24 +0100	[thread overview]
Message-ID: <20200405130724.70094f1c@archlinux> (raw)
In-Reply-To: <f7c16e9f25debe726645f25df6c9c18aa44f0a1f.1586082819.git.lorenzo@kernel.org>

On Sun,  5 Apr 2020 12:36:26 +0200
Lorenzo Bianconi <lorenzo@kernel.org> wrote:

> Remove ST_LSM6DSX_REG_WHOAMI_ADDR duplicated macro and rely on ST sensor
> common definitions
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Applied.

Thanks,

Jonathan

> ---
>  drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> index 84d219ae6aee..f3cf13b29d18 100644
> --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> @@ -58,12 +58,11 @@
>  #include <linux/regmap.h>
>  #include <linux/bitfield.h>
>  
> +#include <linux/iio/common/st_sensors.h>
>  #include <linux/platform_data/st_sensors_pdata.h>
>  
>  #include "st_lsm6dsx.h"
>  
> -#define ST_LSM6DSX_REG_WHOAMI_ADDR		0x0f
> -
>  #define ST_LSM6DSX_TS_SENSITIVITY		25000UL /* 25us */
>  
>  static const struct iio_chan_spec st_lsm6dsx_acc_channels[] = {
> @@ -1364,7 +1363,7 @@ static int st_lsm6dsx_check_whoami(struct st_lsm6dsx_hw *hw, int id,
>  		return -ENODEV;
>  	}
>  
> -	err = regmap_read(hw->regmap, ST_LSM6DSX_REG_WHOAMI_ADDR, &data);
> +	err = regmap_read(hw->regmap, ST_SENSORS_DEFAULT_WAI_ADDRESS, &data);
>  	if (err < 0) {
>  		dev_err(hw->dev, "failed to read whoami register\n");
>  		return err;


  reply	other threads:[~2020-04-05 12:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05 10:36 [PATCH] iio: imu: st_lsm6dsx: remove duplicated macro Lorenzo Bianconi
2020-04-05 12:07 ` Jonathan Cameron [this message]
2020-04-05 12:09   ` Jonathan Cameron
2020-04-05 12:35     ` Lorenzo Bianconi
2020-04-05 17:14       ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200405130724.70094f1c@archlinux \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.