* [PATCH] iio:buffer_cb: Constify iio_cb_access
@ 2013-09-15 16:09 Lars-Peter Clausen
2013-09-15 17:58 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2013-09-15 16:09 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
The iio_cb_access struct is never modified so we can mark it as const.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/iio/buffer_cb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/buffer_cb.c b/drivers/iio/buffer_cb.c
index 9d19ba7..f406889 100644
--- a/drivers/iio/buffer_cb.c
+++ b/drivers/iio/buffer_cb.c
@@ -21,7 +21,7 @@ static int iio_buffer_cb_store_to(struct iio_buffer *buffer, u8 *data)
return cb_buff->cb(data, cb_buff->private);
}
-static struct iio_buffer_access_funcs iio_cb_access = {
+static const struct iio_buffer_access_funcs iio_cb_access = {
.store_to = &iio_buffer_cb_store_to,
};
--
1.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio:buffer_cb: Constify iio_cb_access
2013-09-15 16:09 [PATCH] iio:buffer_cb: Constify iio_cb_access Lars-Peter Clausen
@ 2013-09-15 17:58 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2013-09-15 17:58 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: linux-iio
On 09/15/13 17:09, Lars-Peter Clausen wrote:
> The iio_cb_access struct is never modified so we can mark it as const.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Good point.
Applied to the togreg branch of iio.git
Thanks,
Jonathan
> ---
> drivers/iio/buffer_cb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/buffer_cb.c b/drivers/iio/buffer_cb.c
> index 9d19ba7..f406889 100644
> --- a/drivers/iio/buffer_cb.c
> +++ b/drivers/iio/buffer_cb.c
> @@ -21,7 +21,7 @@ static int iio_buffer_cb_store_to(struct iio_buffer *buffer, u8 *data)
> return cb_buff->cb(data, cb_buff->private);
> }
>
> -static struct iio_buffer_access_funcs iio_cb_access = {
> +static const struct iio_buffer_access_funcs iio_cb_access = {
> .store_to = &iio_buffer_cb_store_to,
> };
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-15 16:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-15 16:09 [PATCH] iio:buffer_cb: Constify iio_cb_access Lars-Peter Clausen
2013-09-15 17:58 ` 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).