kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure
@ 2015-11-15 20:00 Julia Lawall
  2015-11-15 20:19 ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2015-11-15 20:00 UTC (permalink / raw)
  To: linux-arm-kernel

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,


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure
  2015-11-15 20:00 [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure Julia Lawall
@ 2015-11-15 20:19 ` Lars-Peter Clausen
  2015-11-18 19:04   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2015-11-15 20:19 UTC (permalink / raw)
  To: linux-arm-kernel

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,
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure
  2015-11-15 20:19 ` Lars-Peter Clausen
@ 2015-11-18 19:04   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2015-11-18 19:04 UTC (permalink / raw)
  To: linux-arm-kernel

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,
>>
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-18 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-15 20:00 [PATCH] iio: adc: xilinx: constify iio_buffer_setup_ops structure Julia Lawall
2015-11-15 20:19 ` Lars-Peter Clausen
2015-11-18 19:04   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).