o wdt: fix up header cleanups: add include linux/interrupt.h

Also some cleanups removing not needed includes and initializer style.
parent 006e4f38
...@@ -27,26 +27,26 @@ ...@@ -27,26 +27,26 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/interrupt.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/version.h> #include <linux/version.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/watchdog.h> #include <linux/watchdog.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
static int eurwdt_is_open; static int eurwdt_is_open;
static spinlock_t eurwdt_lock; static spinlock_t eurwdt_lock;
...@@ -256,9 +256,9 @@ static int eurwdt_ioctl(struct inode *inode, struct file *file, ...@@ -256,9 +256,9 @@ static int eurwdt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
static struct watchdog_info ident = { static struct watchdog_info ident = {
options : WDIOF_CARDRESET, .options = WDIOF_CARDRESET,
firmware_version : 1, .firmware_version = 1,
identity : "WDT Eurotech CPU-1220/1410" .identity = "WDT Eurotech CPU-1220/1410",
}; };
int time; int time;
...@@ -396,11 +396,10 @@ static struct file_operations eurwdt_fops = { ...@@ -396,11 +396,10 @@ static struct file_operations eurwdt_fops = {
.release = eurwdt_release, .release = eurwdt_release,
}; };
static struct miscdevice eurwdt_miscdev = static struct miscdevice eurwdt_miscdev = {
{ .minor = WATCHDOG_MINOR,
WATCHDOG_MINOR, .name = "watchdog",
"watchdog", .fops = &eurwdt_fops
&eurwdt_fops
}; };
/* /*
...@@ -408,11 +407,8 @@ static struct miscdevice eurwdt_miscdev = ...@@ -408,11 +407,8 @@ static struct miscdevice eurwdt_miscdev =
* turn the timebomb registers off. * turn the timebomb registers off.
*/ */
static struct notifier_block eurwdt_notifier = static struct notifier_block eurwdt_notifier = {
{ .notifier_call = eurwdt_notify_sys,
eurwdt_notify_sys,
NULL,
0
}; };
/** /**
......
...@@ -34,29 +34,29 @@ ...@@ -34,29 +34,29 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/interrupt.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/version.h> #include <linux/version.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/watchdog.h> #include <linux/watchdog.h>
#define WDT_IS_PCI
#include "wd501p.h"
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#define WDT_IS_PCI
#include "wd501p.h"
#define PFX "wdt_pci: " #define PFX "wdt_pci: "
/* /*
...@@ -331,12 +331,12 @@ static ssize_t wdtpci_read(struct file *file, char *buf, size_t count, loff_t *p ...@@ -331,12 +331,12 @@ static ssize_t wdtpci_read(struct file *file, char *buf, size_t count, loff_t *p
static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd, static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg) unsigned long arg)
{ {
static struct watchdog_info ident= static struct watchdog_info ident = {
{ .options = WDIOF_OVERHEAT | WDIOF_POWERUNDER |
WDIOF_OVERHEAT|WDIOF_POWERUNDER|WDIOF_POWEROVER WDIOF_POWEROVER | WDIOF_EXTERN1 |
|WDIOF_EXTERN1|WDIOF_EXTERN2|WDIOF_FANFAULT, WDIOF_EXTERN2 | WDIOF_FANFAULT,
1, .firmware_version = 1,
"WDT500/501PCI" .identity = "WDT500/501PCI",
}; };
ident.options&=WDT_OPTION_MASK; /* Mask down to the card we have */ ident.options&=WDT_OPTION_MASK; /* Mask down to the card we have */
...@@ -481,19 +481,17 @@ static struct file_operations wdtpci_fops = { ...@@ -481,19 +481,17 @@ static struct file_operations wdtpci_fops = {
.release = wdtpci_release, .release = wdtpci_release,
}; };
static struct miscdevice wdtpci_miscdev= static struct miscdevice wdtpci_miscdev = {
{ .minor = WATCHDOG_MINOR,
WATCHDOG_MINOR, .name = "watchdog",
"watchdog", .fops = &wdtpci_fops,
&wdtpci_fops
}; };
#ifdef CONFIG_WDT_501 #ifdef CONFIG_WDT_501
static struct miscdevice temp_miscdev= static struct miscdevice temp_miscdev = {
{ .minor = TEMP_MINOR,
TEMP_MINOR, .name = "temperature",
"temperature", .fops = &wdtpci_fops,
&wdtpci_fops
}; };
#endif #endif
...@@ -502,11 +500,8 @@ static struct miscdevice temp_miscdev= ...@@ -502,11 +500,8 @@ static struct miscdevice temp_miscdev=
* turn the timebomb registers off. * turn the timebomb registers off.
*/ */
static struct notifier_block wdtpci_notifier= static struct notifier_block wdtpci_notifier = {
{ .notifier_call = wdtpci_notify_sys,
wdtpci_notify_sys,
NULL,
0
}; };
...@@ -594,7 +589,12 @@ static void __devexit wdtpci_remove_one (struct pci_dev *pdev) ...@@ -594,7 +589,12 @@ static void __devexit wdtpci_remove_one (struct pci_dev *pdev)
static struct pci_device_id wdtpci_pci_tbl[] __initdata = { static struct pci_device_id wdtpci_pci_tbl[] __initdata = {
{ PCI_VENDOR_ID_ACCESSIO, PCI_DEVICE_ID_WDG_CSM, PCI_ANY_ID, PCI_ANY_ID, }, {
.vendor = PCI_VENDOR_ID_ACCESSIO,
.device = PCI_DEVICE_ID_WDG_CSM,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},
{ 0, }, /* terminate list */ { 0, }, /* terminate list */
}; };
MODULE_DEVICE_TABLE(pci, wdtpci_pci_tbl); MODULE_DEVICE_TABLE(pci, wdtpci_pci_tbl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment