All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org, Shubhrajyoti Datta <shubhrajyoti@ti.com>
Subject: Re: [PATCH 5/9] staging:iio:hmc5843: Device has 3 channels, no need to store separately
Date: Sun, 04 Aug 2013 11:10:54 +0100	[thread overview]
Message-ID: <51FE28AE.8050601@kernel.org> (raw)
In-Reply-To: <1374939112-18237-6-git-send-email-pmeerw@pmeerw.net>

On 07/27/13 16:31, Peter Meerwald wrote:
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> Cc: Shubhrajyoti Datta <shubhrajyoti@ti.com>
I was a little in two minds about whether the slight loss of clarity in dropping
this was worth the saving in code.  Personally I wouldn't have bothered making
the change, but as you have done it I'll take it ;)

Applied to the togreg branch of iio.git

Thanks,


> ---
>  drivers/staging/iio/magnetometer/hmc5843.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
> index 465dc2a..042467d 100644
> --- a/drivers/staging/iio/magnetometer/hmc5843.c
> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
> @@ -178,7 +178,6 @@ static const char * const hmc5883_regval_to_sample_freq[] = {
>  /* Describe chip variants */
>  struct hmc5843_chip_info {
>  	const struct iio_chan_spec *channels;
> -	int num_channels;
>  	const char * const *regval_to_sample_freq;
>  	const int *regval_to_input_field_mga;
>  	const int *regval_to_nanoscale;
> @@ -594,7 +593,6 @@ static const struct attribute_group hmc5843_group = {
>  static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
>  	[HMC5843_ID] = {
>  		.channels = hmc5843_channels,
> -		.num_channels = ARRAY_SIZE(hmc5843_channels),
>  		.regval_to_sample_freq = hmc5843_regval_to_sample_freq,
>  		.regval_to_input_field_mga =
>  			hmc5843_regval_to_input_field_mga,
> @@ -602,7 +600,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
>  	},
>  	[HMC5883_ID] = {
>  		.channels = hmc5883_channels,
> -		.num_channels = ARRAY_SIZE(hmc5883_channels),
>  		.regval_to_sample_freq = hmc5883_regval_to_sample_freq,
>  		.regval_to_input_field_mga =
>  			hmc5883_regval_to_input_field_mga,
> @@ -610,7 +607,6 @@ static const struct hmc5843_chip_info hmc5843_chip_info_tbl[] = {
>  	},
>  	[HMC5883L_ID] = {
>  		.channels = hmc5883_channels,
> -		.num_channels = ARRAY_SIZE(hmc5883_channels),
>  		.regval_to_sample_freq = hmc5883_regval_to_sample_freq,
>  		.regval_to_input_field_mga =
>  			hmc5883l_regval_to_input_field_mga,
> @@ -627,7 +623,7 @@ static void hmc5843_init_client(struct i2c_client *client,
>  
>  	data->variant = &hmc5843_chip_info_tbl[id->driver_data];
>  	indio_dev->channels = data->variant->channels;
> -	indio_dev->num_channels = data->variant->num_channels;
> +	indio_dev->num_channels = 3;
>  	hmc5843_set_meas_conf(client, data->meas_conf);
>  	hmc5843_set_rate(client, data->rate);
>  	hmc5843_configure(client, data->operating_mode);
> 

  reply	other threads:[~2013-08-04  9:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-27 15:31 Peter Meerwald
2013-07-27 15:31 ` [PATCH 1/9] staging:iio:hmc5843: Drop I2C detection code Peter Meerwald
2013-08-04 10:01   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 2/9] staging:iio:hmc5843: Remove id register #defines, not used anymore Peter Meerwald
2013-08-04 10:02   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 3/9] staging:iio:hmc5843: Implement timeout in read function Peter Meerwald
2013-08-04 10:03   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 4/9] staging:iio:hmc5843: 'add' is a poor abbreviation for address Peter Meerwald
2013-08-04 10:04   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 5/9] staging:iio:hmc5843: Device has 3 channels, no need to store separately Peter Meerwald
2013-08-04 10:10   ` Jonathan Cameron [this message]
2013-07-27 15:31 ` [PATCH 6/9] staging:iio:hmc5843: Trim sampling_frequencies to sampling_freq Peter Meerwald
2013-07-27 18:01   ` Jonathan Cameron
2013-08-04 10:13   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 7/9] staging:iio:hmc5843: Split and join lines to make checkpatch happy Peter Meerwald
2013-08-04 10:15   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 8/9] staging:iio:hmc5843: Drop unneeded #includes Peter Meerwald
2013-08-04 10:22   ` Jonathan Cameron
2013-07-27 15:31 ` [PATCH 9/9] staging:iio:hmc5843: Use i2c_smbus_read_word_swapped() Peter Meerwald
2013-08-04 10:23   ` 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=51FE28AE.8050601@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=shubhrajyoti@ti.com \
    /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.