* [PATCH] sparc/time: make of_device_ids const
@ 2017-06-15 11:00 Arvind Yadav
2017-06-15 18:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-06-15 11:00 UTC (permalink / raw)
To: davem, john.stultz, nicstange; +Cc: sparclinux, linux-kernel
of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
arch/sparc/kernel/time_32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 9f575df..2ce2e7b 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -298,7 +298,7 @@ static int clock_probe(struct platform_device *op)
return 0;
}
-static struct of_device_id clock_match[] = {
+static const struct of_device_id clock_match[] = {
{
.name = "eeprom",
},
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sparc/time: make of_device_ids const
2017-06-15 11:00 [PATCH] sparc/time: make of_device_ids const Arvind Yadav
@ 2017-06-15 18:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-06-15 18:41 UTC (permalink / raw)
To: arvind.yadav.cs; +Cc: john.stultz, nicstange, sparclinux, linux-kernel
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Thu, 15 Jun 2017 16:30:20 +0530
> of_device_ids are not supposed to change at runtime. All functions
> working with of_device_ids provided by <linux/of.h> work with const
> of_device_ids. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-15 18:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 11:00 [PATCH] sparc/time: make of_device_ids const Arvind Yadav
2017-06-15 18:41 ` David Miller
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).