All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: lars@metafoo.de, pmeerw@pmeerw.net,
	o.v.kravchenko@globallogic.com, stigge@antcom.de
Subject: Re: [PATCH 24/24] iio:drop IIO_ST macro
Date: Sat, 15 Feb 2014 10:58:44 +0000	[thread overview]
Message-ID: <52FF4864.2050205@kernel.org> (raw)
In-Reply-To: <1386787542-19666-25-git-send-email-jic23@kernel.org>

On 11/12/13 18:45, Jonathan Cameron wrote:
> This macro no longer allows all the elements of the scan_type structure
> to be set.  Missinterpretation of the parameters also caused a couple of
> recent bugs.  No mainline drivers now use this macro so drop it.
>
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Finally applied to the togreg branch of iio.git. It's gone at last!

J
> ---
>   include/linux/iio/iio.h | 16 ++++++++++------
>   1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index 75a8a20c8179..5f2d00e7e488 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -254,12 +254,16 @@ static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
>   		(chan->info_mask_shared_by_all & BIT(type));
>   }
>
> -#define IIO_ST(si, rb, sb, sh)						\
> -	{ .sign = si, .realbits = rb, .storagebits = sb, .shift = sh }
> -
> -#define IIO_CHAN_SOFT_TIMESTAMP(_si)					\
> -	{ .type = IIO_TIMESTAMP, .channel = -1,				\
> -			.scan_index = _si, .scan_type = IIO_ST('s', 64, 64, 0) }
> +#define IIO_CHAN_SOFT_TIMESTAMP(_si) {					\
> +	.type = IIO_TIMESTAMP,						\
> +	.channel = -1,							\
> +	.scan_index = _si,						\
> +	.scan_type = {							\
> +		.sign = 's',						\
> +		.realbits = 64,					\
> +		.storagebits = 64,					\
> +		},							\
> +}
>
>   /**
>    * iio_get_time_ns() - utility function to get a time stamp for events etc
>


  reply	other threads:[~2014-02-15 10:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 18:45 [PATCH 00/24] Drop the IIO_ST macro for setting scan_type elements Jonathan Cameron
2013-12-11 18:45 ` [PATCH 01/24] staging:iio:mag:hmc5843 fix incorrect endianness of channel as a result of missuse of the IIO_ST macro Jonathan Cameron
2013-12-17 20:35   ` Jonathan Cameron
2013-12-11 18:45 ` [PATCH 02/24] iio:imu:adis16400 fix pressure channel scan type Jonathan Cameron
2013-12-17 20:38   ` Jonathan Cameron
2013-12-11 18:45 ` [PATCH 03/24] iio:adc:ad7887 Fix channel reported endianness from cpu to big endian Jonathan Cameron
2013-12-17 20:38   ` Jonathan Cameron
2013-12-11 18:45 ` [PATCH 04/24] iio:accel:bma180 replaces IIO_ST macro with explicit entries to struct scan_type Jonathan Cameron
2013-12-11 18:45 ` [PATCH 05/24] iio:mag:mag3110 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 06/24] iio:dac:ad5064 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 07/24] iio:dac:ad5360 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 08/24] iio:dac:ad5380 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 09/24] iio:dac:ad5421 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 10/24] iio:dac:ad5446 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 11/24] iio:dac:ad5449 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 12/24] iio:dac:ad5504 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 13/24] iio:dac:ad5624r " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 14/24] iio:dac:ad5686 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 15/24] iio:dac:ad5755 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 16/24] iio:dac:ad5764 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 17/24] iio:dac:ad5791 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 18/24] iio:dac:max517 drop specification of scan type as unused in this driver Jonathan Cameron
2013-12-11 18:45 ` [PATCH 19/24] iio:dac:mcp4725 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 20/24] iio:light:adjd_s311 replaces IIO_ST macro with explicit entries to struct scan_type Jonathan Cameron
2013-12-11 18:45 ` [PATCH 21/24] iio:light:tcs3472 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 22/24] staging:iio:ad7606 " Jonathan Cameron
2013-12-11 18:45 ` [PATCH 23/24] staging:iio:ad799x " Jonathan Cameron
2013-12-16  8:53   ` Lars-Peter Clausen
2013-12-17 20:29     ` Jonathan Cameron
2013-12-11 18:45 ` [PATCH 24/24] iio:drop IIO_ST macro Jonathan Cameron
2014-02-15 10:58   ` Jonathan Cameron [this message]
2013-12-16  8:55 ` [PATCH 00/24] Drop the IIO_ST macro for setting scan_type elements Lars-Peter Clausen
2013-12-17 21:53   ` 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=52FF4864.2050205@kernel.org \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=o.v.kravchenko@globallogic.com \
    --cc=pmeerw@pmeerw.net \
    --cc=stigge@antcom.de \
    /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.