All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Irina Tirdea <irina.tirdea@intel.com>, linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Markus Pargmann <mpa@pengutronix.de>
Subject: Re: [PATCH 1/1] iio: accel: bmc150: remove unused definition
Date: Mon, 28 Mar 2016 11:08:38 +0100	[thread overview]
Message-ID: <56F902A6.9020307@kernel.org> (raw)
In-Reply-To: <1458810056-24236-1-git-send-email-irina.tirdea@intel.com>

On 24/03/16 09:00, Irina Tirdea wrote:
> bmc150_i2c_regmap_conf is defined in bmc150-accel-core.c, but
> never used here. The definition is needed in bmc150-accel-i2c.c,
> where it is again defined.
> 
> Remove the unnecessary definition of bmc150_i2c_regmap_conf from
> bmc150-accel-core.c and update the one from bmc150-accel-i2c.c
> to contain all fields.
> 
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Silly question.  Why isn't it shared between the i2c and spi drivers?
Looks to be the same in both cases (as we'd expect from regmap most
of the time!).  I think it would be better to share it.

Jonathan
> ---
>  drivers/iio/accel/bmc150-accel-core.c | 6 ------
>  drivers/iio/accel/bmc150-accel-i2c.c  | 1 +
>  2 files changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
> index c73331f7..feff894 100644
> --- a/drivers/iio/accel/bmc150-accel-core.c
> +++ b/drivers/iio/accel/bmc150-accel-core.c
> @@ -246,12 +246,6 @@ static const struct {
>  				       {500000, BMC150_ACCEL_SLEEP_500_MS},
>  				       {1000000, BMC150_ACCEL_SLEEP_1_SEC} };
>  
> -static const struct regmap_config bmc150_i2c_regmap_conf = {
> -	.reg_bits = 8,
> -	.val_bits = 8,
> -	.max_register = 0x3f,
> -};
> -
>  static int bmc150_accel_set_mode(struct bmc150_accel_data *data,
>  				 enum bmc150_power_modes mode,
>  				 int dur_us)
> diff --git a/drivers/iio/accel/bmc150-accel-i2c.c b/drivers/iio/accel/bmc150-accel-i2c.c
> index b41404b..f0969fe 100644
> --- a/drivers/iio/accel/bmc150-accel-i2c.c
> +++ b/drivers/iio/accel/bmc150-accel-i2c.c
> @@ -31,6 +31,7 @@
>  static const struct regmap_config bmc150_i2c_regmap_conf = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
> +	.max_register = 0x3f,
>  };
>  
>  static int bmc150_accel_probe(struct i2c_client *client,
> 


  reply	other threads:[~2016-03-28 10:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  9:00 [PATCH 1/1] iio: accel: bmc150: remove unused definition Irina Tirdea
2016-03-28 10:08 ` Jonathan Cameron [this message]
2016-03-28 16:08   ` Tirdea, Irina
2016-03-28 16:08     ` Tirdea, Irina

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=56F902A6.9020307@kernel.org \
    --to=jic23@kernel.org \
    --cc=irina.tirdea@intel.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    --cc=pmeerw@pmeerw.net \
    /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.