Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269760 > unrolled thread

[PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2015-11-15 21:20 +0100
Last post2015-11-18 20:10 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-15 21:20 +0100
    Re: [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure Lars-Peter Clausen <lars@metafoo.de> - 2015-11-15 21:30 +0100
      Re: [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure Jonathan Cameron <jic23@kernel.org> - 2015-11-18 20:10 +0100

#1269760 — [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2015-11-15 21:20 +0100
Subject[PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure
Message-ID<qvbWi-64q-7@gated-at.bofh.it>
The iio_buffer_setup_ops structures are never modified, so declare this one
as const, like the others.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/iio/adc/xilinx-xadc-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index 0370624..c2b5f10 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -803,7 +803,7 @@ err:
 	return ret;
 }
 
-static struct iio_buffer_setup_ops xadc_buffer_ops = {
+static const struct iio_buffer_setup_ops xadc_buffer_ops = {
 	.preenable = &xadc_preenable,
 	.postenable = &iio_triggered_buffer_postenable,
 	.predisable = &iio_triggered_buffer_predisable,

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1269762

FromLars-Peter Clausen <lars@metafoo.de>
Date2015-11-15 21:30 +0100
Message-ID<qvc5Y-67F-11@gated-at.bofh.it>
In reply to#1269760
On 11/15/2015 09:00 PM, Julia Lawall wrote:
> The iio_buffer_setup_ops structures are never modified, so declare this one
> as const, like the others.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.

> 
> ---
>  drivers/iio/adc/xilinx-xadc-core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
> index 0370624..c2b5f10 100644
> --- a/drivers/iio/adc/xilinx-xadc-core.c
> +++ b/drivers/iio/adc/xilinx-xadc-core.c
> @@ -803,7 +803,7 @@ err:
>  	return ret;
>  }
>  
> -static struct iio_buffer_setup_ops xadc_buffer_ops = {
> +static const struct iio_buffer_setup_ops xadc_buffer_ops = {
>  	.preenable = &xadc_preenable,
>  	.postenable = &iio_triggered_buffer_postenable,
>  	.predisable = &iio_triggered_buffer_predisable,
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1272486

FromJonathan Cameron <jic23@kernel.org>
Date2015-11-18 20:10 +0100
Message-ID<qwghc-77w-25@gated-at.bofh.it>
In reply to#1269762
On 15/11/15 20:19, Lars-Peter Clausen wrote:
> On 11/15/2015 09:00 PM, Julia Lawall wrote:
>> The iio_buffer_setup_ops structures are never modified, so declare this one
>> as const, like the others.
>>
>> Done with the help of Coccinelle.
>>
>> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Applied.

Thanks,

Jonathan
> 
> Thanks.
> 
>>
>> ---
>>  drivers/iio/adc/xilinx-xadc-core.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
>> index 0370624..c2b5f10 100644
>> --- a/drivers/iio/adc/xilinx-xadc-core.c
>> +++ b/drivers/iio/adc/xilinx-xadc-core.c
>> @@ -803,7 +803,7 @@ err:
>>  	return ret;
>>  }
>>  
>> -static struct iio_buffer_setup_ops xadc_buffer_ops = {
>> +static const struct iio_buffer_setup_ops xadc_buffer_ops = {
>>  	.preenable = &xadc_preenable,
>>  	.postenable = &iio_triggered_buffer_postenable,
>>  	.predisable = &iio_triggered_buffer_predisable,
>>
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web