diff mbox

booke_wdt: Fix build (unconstify watchdog_info)

Message ID 20100426174358.GA16889@oksana.dev.rtsoft.ru (mailing list archive)
State Not Applicable
Delegated to: Benjamin Herrenschmidt
Headers show

Commit Message

Anton Vorontsov April 26, 2010, 5:43 p.m. UTC
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.

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
---
 drivers/watchdog/booke_wdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Benjamin Herrenschmidt April 27, 2010, 6:37 a.m. UTC | #1
On Mon, 2010-04-26 at 21:43 +0400, Anton Vorontsov wrote:
> 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.

> Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
> ---
>  drivers/watchdog/booke_wdt.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-
> 
> diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
> index 500d383..801ead1 100644
> --- a/drivers/watchdog/booke_wdt.c
> +++ b/drivers/watchdog/booke_wdt.c
> @@ -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",
>  };
Wim Van Sebroeck April 27, 2010, 7:42 a.m. UTC | #2
Hi Ben,

> > 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.
Benjamin Herrenschmidt April 27, 2010, 7:45 a.m. UTC | #3
On Tue, 2010-04-27 at 09:42 +0200, Wim Van Sebroeck wrote:
> Hi Ben,
> 
> > > 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.

Thanks !

Cheers,
Ben.
diff mbox

Patch

diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 500d383..801ead1 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -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",
 };