From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCE9DC2D0F4 for ; Sun, 5 Apr 2020 12:09:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A01F20709 for ; Sun, 5 Apr 2020 12:09:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbgDEMJQ (ORCPT ); Sun, 5 Apr 2020 08:09:16 -0400 Received: from saturn.retrosnub.co.uk ([46.235.226.198]:35348 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbgDEMJQ (ORCPT ); Sun, 5 Apr 2020 08:09:16 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) by saturn.retrosnub.co.uk (Postfix; Retrosnub mail submission) with ESMTPSA id 666009E74A5; Sun, 5 Apr 2020 13:09:14 +0100 (BST) Date: Sun, 5 Apr 2020 13:09:12 +0100 From: Jonathan Cameron To: Lorenzo Bianconi Cc: linux-iio@vger.kernel.org, lorenzo.bianconi@redhat.com Subject: Re: [PATCH] iio: imu: st_lsm6dsx: remove duplicated macro Message-ID: <20200405130912.5929ee08@archlinux> In-Reply-To: <20200405130724.70094f1c@archlinux> References: <20200405130724.70094f1c@archlinux> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sun, 5 Apr 2020 13:07:24 +0100 Jonathan Cameron wrote: > On Sun, 5 Apr 2020 12:36:26 +0200 > Lorenzo Bianconi wrote: > > > Remove ST_LSM6DSX_REG_WHOAMI_ADDR duplicated macro and rely on ST sensor > > common definitions > > > > Signed-off-by: Lorenzo Bianconi > Applied. Actually no. I'd rather duplicate the value than have this largerly unconnected driver include that header with lots of other stuff in it. So dropped. Thanks, Jonathan > > 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 > > #include > > > > +#include > > #include > > > > #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; >