lkml.org 
[lkml]   [2010]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] [PATCH] watchdog_info separation and constify
Date
From
On Tue Jan 19, 2010, Wim Van Sebroeck wrote:
> Hi All,
>
> please comment on following patch.
>
> Kind regards,
> Wim.
>
> commit 88d0b1a9c071d26e7b4831320067c84b04ea04a8
> Author: Wim Van Sebroeck <wim@xxxxxxxxx>
> Date: Sat Dec 26 18:55:22 2009 +0000
>
> [WATCHDOG] watchdog_info separation and constify
>
> make sure that the watchdog_info struct is seperated from the ioctl code.
> Also make the struct const where possible.
>
> Signed-off-by: Wim Van Sebroeck <wim@xxxxxxxxx>

[snip]

> diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c
> index cdd55e0..88ed54e 100644
> --- a/drivers/watchdog/ep93xx_wdt.c
> +++ b/drivers/watchdog/ep93xx_wdt.c
> @@ -131,7 +131,7 @@ ep93xx_wdt_write(struct file *file, const char __user *data, size_t len,
> return len;
> }
>
> -static struct watchdog_info ident = {
> +static const struct watchdog_info ident = {
> .options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE,
> .identity = "EP93xx Watchdog",
> };

Before:
$ size ep93xx_wdt.o
text data bss dec hex filename
1613 88 40 1741 6cd ep93xx_wdt.o

After:
$ size ep93xx_wdt.o
text data bss dec hex filename
1653 48 40 1741 6cd ep93xx_wdt.o

Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com>
\
 
 \ /
  Last update: 2010-01-19 22:55    [W:0.025 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site