linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: ambakmi: constify amba_id
@ 2017-08-23 16:19 Arvind Yadav
  2017-08-24 23:08 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-23 16:19 UTC (permalink / raw)
  To: linux, dmitry.torokhov; +Cc: linux-kernel, linux-input

amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/input/serio/ambakmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index c6606ca..ff3875c 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -187,7 +187,7 @@ static int __maybe_unused amba_kmi_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(amba_kmi_dev_pm_ops, NULL, amba_kmi_resume);
 
-static struct amba_id amba_kmi_idtable[] = {
+static const struct amba_id amba_kmi_idtable[] = {
 	{
 		.id	= 0x00041050,
 		.mask	= 0x000fffff,
-- 
2.7.4


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

* Re: [PATCH] Input: ambakmi: constify amba_id
  2017-08-23 16:19 [PATCH] Input: ambakmi: constify amba_id Arvind Yadav
@ 2017-08-24 23:08 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2017-08-24 23:08 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: linux, linux-kernel, linux-input

On Wed, Aug 23, 2017 at 09:49:11PM +0530, Arvind Yadav wrote:
> amba_id are not supposed to change at runtime. All functions
> working with const amba_id. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Applied, thank you.

> ---
>  drivers/input/serio/ambakmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
> index c6606ca..ff3875c 100644
> --- a/drivers/input/serio/ambakmi.c
> +++ b/drivers/input/serio/ambakmi.c
> @@ -187,7 +187,7 @@ static int __maybe_unused amba_kmi_resume(struct device *dev)
>  
>  static SIMPLE_DEV_PM_OPS(amba_kmi_dev_pm_ops, NULL, amba_kmi_resume);
>  
> -static struct amba_id amba_kmi_idtable[] = {
> +static const struct amba_id amba_kmi_idtable[] = {
>  	{
>  		.id	= 0x00041050,
>  		.mask	= 0x000fffff,
> -- 
> 2.7.4
> 

-- 
Dmitry

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

end of thread, other threads:[~2017-08-24 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-23 16:19 [PATCH] Input: ambakmi: constify amba_id Arvind Yadav
2017-08-24 23:08 ` 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).