Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1718511 > unrolled thread

[PATCH] watchdog: sp805: constify amba_id

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-23 18:40 +0200
Last post2017-08-23 18:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] watchdog: sp805: constify amba_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 18:40 +0200

#1718511 — [PATCH] watchdog: sp805: constify amba_id

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-23 18:40 +0200
Subject[PATCH] watchdog: sp805: constify amba_id
Message-ID<uhGRc-2TW-17@gated-at.bofh.it>
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/watchdog/sp805_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index e7a715e..03805bc 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -281,7 +281,7 @@ static int __maybe_unused sp805_wdt_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(sp805_wdt_dev_pm_ops, sp805_wdt_suspend,
 		sp805_wdt_resume);
 
-static struct amba_id sp805_wdt_ids[] = {
+static const struct amba_id sp805_wdt_ids[] = {
 	{
 		.id	= 0x00141805,
 		.mask	= 0x00ffffff,
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web