linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: bma150 - constify bma150_cfg structure
@ 2015-12-30 11:11 Julia Lawall
  2016-01-03  5:05 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2015-12-30 11:11 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: kernel-janitors, linux-input, linux-kernel

The bma150_cfg structure is never modified, so declare it as const.

Done with the help of Coccinelle.

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

---
 drivers/input/misc/bma150.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
index 1d0e61d..b0d4453 100644
--- a/drivers/input/misc/bma150.c
+++ b/drivers/input/misc/bma150.c
@@ -147,7 +147,7 @@ struct bma150_data {
  * are stated and verified by Bosch Sensortec where they are configured
  * to provide a generic sensitivity performance.
  */
-static struct bma150_cfg default_cfg = {
+static const struct bma150_cfg default_cfg = {
 	.any_motion_int = 1,
 	.hg_int = 1,
 	.lg_int = 1,


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

* Re: [PATCH] Input: bma150 - constify bma150_cfg structure
  2015-12-30 11:11 [PATCH] Input: bma150 - constify bma150_cfg structure Julia Lawall
@ 2016-01-03  5:05 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2016-01-03  5:05 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, linux-input, linux-kernel

On Wed, Dec 30, 2015 at 12:11:19PM +0100, Julia Lawall wrote:
> The bma150_cfg structure is never modified, so declare it as const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Applied, thank you.

> 
> ---
>  drivers/input/misc/bma150.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
> index 1d0e61d..b0d4453 100644
> --- a/drivers/input/misc/bma150.c
> +++ b/drivers/input/misc/bma150.c
> @@ -147,7 +147,7 @@ struct bma150_data {
>   * are stated and verified by Bosch Sensortec where they are configured
>   * to provide a generic sensitivity performance.
>   */
> -static struct bma150_cfg default_cfg = {
> +static const struct bma150_cfg default_cfg = {
>  	.any_motion_int = 1,
>  	.hg_int = 1,
>  	.lg_int = 1,
> 

-- 
Dmitry

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

end of thread, other threads:[~2016-01-03  5:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-30 11:11 [PATCH] Input: bma150 - constify bma150_cfg structure Julia Lawall
2016-01-03  5:05 ` Dmitry Torokhov

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).