Skip to contentSkip to conversation

booke_wdt: Fix build (unconstify watchdog_info)

PATCH In review Anton Vorontsov 3 participants 4 messages Apr 26, 2010 – Apr 27, 2010 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 booke_wdt: Fix build (unconstify watchdog_info)

commit 42747d712de56cf2087b702d2ad90af114c53138 ("[WATCHDOG] watchdog_info constify") introduced the following build failure:

CC booke_wdt.o
booke_wdt.c: In function 'booke_wdt_init':
booke_wdt.c:220: error: assignment of read-only variable 'ident'

Fix this by removing 'const' qualifier from watchdog_info struct.

---
 drivers/watchdog/booke_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/booke_wdt.c +1 -1
index 500d383..801ead1 100644
@@ -121,7 +121,7 @@ static ssize_t booke_wdt_write(struct file *file, const char __user *buf,
 	return count;
 }
 
-static const struct watchdog_info ident = {
+static struct watchdog_info ident = {
 	.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
 	.identity = "PowerPC Book-E Watchdog",
 };
Signature · 1 line
1.7.0.5
#1 lore raw
Quoted 8 lines · Anton Vorontsov

commit 42747d712de56cf2087b702d2ad90af114c53138 ("[WATCHDOG] watchdog_info constify") introduced the following build failure:

CC booke_wdt.o
booke_wdt.c: In function 'booke_wdt_init':
booke_wdt.c:220: error: assignment of read-only variable 'ident'

Fix this by removing 'const' qualifier from watchdog_info struct.

Should this go via powerpc.git ? If yes, I'll send to Linus asap.

Cheers,
Ben.

Quoted 18 lines
---
 drivers/watchdog/booke_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-
drivers/watchdog/booke_wdt.c +1 -1
index 500d383..801ead1 100644
@@ -121,7 +121,7 @@ static ssize_t booke_wdt_write(struct file *file, const char __user *buf,
 	return count;
 }
 
-static const struct watchdog_info ident = {
+static struct watchdog_info ident = {
 	.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
 	.identity = "PowerPC Book-E Watchdog",
 };
#2 lore raw

Hi Ben,

Quoted 10 lines
Quoted 8 lines

commit 42747d712de56cf2087b702d2ad90af114c53138 ("[WATCHDOG] watchdog_info constify") introduced the following build failure:

CC booke_wdt.o
booke_wdt.c: In function 'booke_wdt_init':
booke_wdt.c:220: error: assignment of read-only variable 'ident'

Fix this by removing 'const' qualifier from watchdog_info struct.

Should this go via powerpc.git ? If yes, I'll send to Linus asap.

I'm sending watchdog related patches to Linus today. This one will be included.

Kind regards,
Wim.

#3 lore raw
Quoted 9 lines · Wim Van Sebroeck

Hi Ben,

Quoted 7 lines
Quoted 7 lines

commit 42747d712de56cf2087b702d2ad90af114c53138 ("[WATCHDOG] watchdog_info constify") introduced the following build failure:

CC booke_wdt.o
booke_wdt.c: In function 'booke_wdt_init':
booke_wdt.c:220: error: assignment of read-only variable 'ident'

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Fix this by removing 'const' qualifier from watchdog_info struct.

Should this go via powerpc.git ? If yes, I'll send to Linus asap.

I'm sending watchdog related patches to Linus today. This one will be included.

Thanks !

Cheers,
Ben.