Re: [PATCH 11/42] ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE

Opensource [Adam Thomson]
2015-08-03T14:47:37Z

On August 2, 2015 16:20, Lars-Peter Clausen wrote:

> DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
> that it automatically calculates the number of items in the TLV and is
> hence less prone to manual error.
>
> Generate using the following coccinelle script
>
> // <smpl>
> @@
> declarer name DECLARE_TLV_DB_RANGE;
> identifier tlv;
> constant x;
> @@
> -unsigned int tlv[] = {
> - TLV_DB_RANGE_HEAD(x),
> +DECLARE_TLV_DB_RANGE(tlv,
> ...
> -};
> +);
> // </smpl>
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>