Skip to content

Commit

Permalink
[WATCHDOG] watchdog_info constify
Browse files Browse the repository at this point in the history
make the watchdog_info struct const where possible.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Wim Van Sebroeck committed Mar 7, 2010
1 parent cda61c9 commit 42747d7
Show file tree
Hide file tree
Showing 52 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/52xx/mpc52xx_gpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ static ssize_t mpc52xx_wdt_write(struct file *file, const char __user *data,
return 0;
}

static struct watchdog_info mpc5200_wdt_info = {
static const struct watchdog_info mpc5200_wdt_info = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
.identity = WDT_IDENTITY,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/acquirewdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static long acq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
int options, retval = -EINVAL;
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
.firmware_version = 1,
.identity = WATCHDOG_NAME,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/advantechwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
int new_timeout;
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING |
WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/adx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct adx_wdt {
spinlock_t lock;
};

static struct watchdog_info adx_wdt_info = {
static const struct watchdog_info adx_wdt_info = {
.identity = "Avionic Design Xanthos Watchdog",
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/alim1535_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static long ali_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING |
WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/alim7101_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT
| WDIOF_MAGICCLOSE,
.firmware_version = 1,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/ar7_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data,
static long ar7_wdt_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.identity = LONGNAME,
.firmware_version = 1,
.options = (WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/at32ap700x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static int at32_wdt_get_status(void)
return status;
}

static struct watchdog_info at32_wdt_info = {
static const struct watchdog_info at32_wdt_info = {
.identity = "at32ap700x watchdog",
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/at91rm9200_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static int at91_wdt_settimeout(int new_time)
return 0;
}

static struct watchdog_info at91_wdt_info = {
static const struct watchdog_info at91_wdt_info = {
.identity = "at91 watchdog",
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/bcm47xx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static ssize_t bcm47xx_wdt_write(struct file *file, const char __user *data,
return len;
}

static struct watchdog_info bcm47xx_wdt_info = {
static const struct watchdog_info bcm47xx_wdt_info = {
.identity = DRV_NAME,
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
Expand Down
4 changes: 2 additions & 2 deletions drivers/watchdog/bfin_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

static unsigned int timeout = WATCHDOG_TIMEOUT;
static int nowayout = WATCHDOG_NOWAYOUT;
static struct watchdog_info bfin_wdt_info;
static const struct watchdog_info bfin_wdt_info;
static unsigned long open_check;
static char expect_close;
static DEFINE_SPINLOCK(bfin_wdt_spinlock);
Expand Down Expand Up @@ -388,7 +388,7 @@ static struct miscdevice bfin_wdt_miscdev = {
.fops = &bfin_wdt_fops,
};

static struct watchdog_info bfin_wdt_info = {
static const struct watchdog_info bfin_wdt_info = {
.identity = "Blackfin Watchdog",
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/booke_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static ssize_t booke_wdt_write(struct file *file, const char __user *buf,
return count;
}

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
.identity = "PowerPC Book-E Watchdog",
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/coh901327_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ static long coh901327_ioctl(struct file *file, unsigned int cmd,
struct watchdog_info __user *ident;
int __user *i;
} uarg;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_CARDRESET |
WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/cpu5wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static long cpu5wdt_ioctl(struct file *file, unsigned int cmd,
void __user *argp = (void __user *)arg;
int __user *p = argp;
unsigned int value;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_CARDRESET,
.identity = "CPU5 WDT",
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/cpwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static int cpwd_release(struct inode *inode, struct file *file)

static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
static struct watchdog_info info = {
static const struct watchdog_info info = {
.options = WDIOF_SETTIMEOUT,
.firmware_version = 1,
.identity = DRIVER_NAME,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/davinci_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ davinci_wdt_write(struct file *file, const char *data, size_t len,
return len;
}

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING,
.identity = "DaVinci Watchdog",
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/ep93xx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/eurotechwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static long eurwdt_ioctl(struct file *file,
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT
| WDIOF_MAGICCLOSE,
.firmware_version = 1,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/gef_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static long gef_wdt_ioctl(struct file *file, unsigned int cmd,
int timeout;
int options;
void __user *argp = (void __user *)arg;
static struct watchdog_info info = {
static const struct watchdog_info info = {
.options = WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE |
WDIOF_KEEPALIVEPING,
.firmware_version = 0,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/geodewdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static long geodewdt_ioctl(struct file *file, unsigned int cmd,
int __user *p = argp;
int interval;

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING
| WDIOF_MAGICCLOSE,
.firmware_version = 1,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/hpwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static ssize_t hpwdt_write(struct file *file, const char __user *data,
return len;
}

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/i6300esb.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static long esb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
int new_heartbeat;
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/iTCO_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ static long iTCO_wdt_ioctl(struct file *file, unsigned int cmd,
int new_heartbeat;
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/ib700wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static long ibwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
void __user *argp = (void __user *)arg;
int __user *p = argp;

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT
| WDIOF_MAGICCLOSE,
.firmware_version = 1,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/indydog.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static long indydog_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
int options, retval = -EINVAL;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING,
.firmware_version = 0,
.identity = "Hardware Watchdog for SGI IP22",
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/it8712f_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd,
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.identity = "IT8712F Watchdog",
.firmware_version = 1,
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/it87_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static ssize_t wdt_write(struct file *file, const char __user *buf,
return count;
}

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING,
.firmware_version = 1,
.identity = WATCHDOG_NAME,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/ixp2000_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static ssize_t ixp2000_wdt_write(struct file *file, const char *data,
}


static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_MAGICCLOSE | WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING,
.identity = "IXP2000 Watchdog",
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/ixp4xx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ixp4xx_wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos)
return len;
}

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE |
WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
.identity = "IXP4xx Watchdog",
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/ks8695_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int ks8695_wdt_close(struct inode *inode, struct file *file)
return 0;
}

static struct watchdog_info ks8695_wdt_info = {
static const struct watchdog_info ks8695_wdt_info = {
.identity = "ks8695 watchdog",
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/machzwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ MODULE_PARM_DESC(nowayout,

#define PFX "machzwd"

static struct watchdog_info zf_info = {
static const struct watchdog_info zf_info = {
.options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
.firmware_version = 1,
.identity = "ZF-Logic watchdog",
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/mixcomwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static long mixcomwd_ioctl(struct file *file,
void __user *argp = (void __user *)arg;
int __user *p = argp;
int status;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
.firmware_version = 1,
.identity = "MixCOM watchdog",
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/mpc8xxx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static long mpc8xxx_wdt_ioctl(struct file *file, unsigned int cmd,
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING,
.firmware_version = 1,
.identity = "MPC8xxx",
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/mpcore_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static ssize_t mpcore_wdt_write(struct file *file, const char *data,
return len;
}

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/mv64x60_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static long mv64x60_wdt_ioctl(struct file *file,
int timeout;
int options;
void __user *argp = (void __user *)arg;
static struct watchdog_info info = {
static const struct watchdog_info info = {
.options = WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE |
WDIOF_KEEPALIVEPING,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/pc87413_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd,
int __user *i;
} uarg;

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING |
WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/pcwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ static long pcwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
int temperature;
int new_heartbeat;
int __user *argp = (int __user *)arg;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_OVERHEAT |
WDIOF_CARDRESET |
WDIOF_KEEPALIVEPING |
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/pcwd_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ static long pcipcwd_ioctl(struct file *file, unsigned int cmd,
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_OVERHEAT |
WDIOF_CARDRESET |
WDIOF_KEEPALIVEPING |
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/pcwd_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ static long usb_pcwd_ioctl(struct file *file, unsigned int cmd,
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING |
WDIOF_SETTIMEOUT |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/pika_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static struct {
struct timer_list timer; /* The timer that pings the watchdog */
} pikawdt_private;

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.identity = DRV_NAME,
.options = WDIOF_CARDRESET |
WDIOF_SETTIMEOUT |
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/pnx833x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static long pnx833x_wdt_ioctl(struct file *file, unsigned int cmd,
int options, new_timeout = 0;
uint32_t timeout, timeout_left = 0;

static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
.firmware_version = 0,
.identity = "Hardware Watchdog for PNX833x",
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/rc32434_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd,
void __user *argp = (void __user *)arg;
int new_timeout;
unsigned int value;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/rdc321x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static long rdc321x_wdt_ioctl(struct file *file, unsigned int cmd,
{
void __user *argp = (void __user *)arg;
unsigned int value;
static struct watchdog_info ident = {
static const struct watchdog_info ident = {
.options = WDIOF_CARDRESET,
.identity = "RDC321x WDT",
};
Expand Down
Loading

0 comments on commit 42747d7

Please sign in to comment.