diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-12 21:51:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-12 21:51:36 -0500 |
commit | d9405057c18cdc62eade7106a774d87a3e080875 (patch) | |
tree | ba3567e949789f8459ea4d79699a5bc831b97abc | |
parent | c4366889dda8110247be59ca41fddb82951a8c26 (diff) | |
parent | a57bf8a4f23cca2b5be5446649bbe22d1440af5d (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
[WATCHDOG] pcwd_usb.c generic HID include file
[WATCHDOG] watchdog miscdevice patch
[WATCHDOG] rm9k_wdt: fix interrupt handler arguments
[WATCHDOG] rm9k_wdt: fix compilation
-rw-r--r-- | drivers/char/watchdog/at91rm9200_wdt.c | 6 | ||||
-rw-r--r-- | drivers/char/watchdog/mpcore_wdt.c | 2 | ||||
-rw-r--r-- | drivers/char/watchdog/omap_wdt.c | 2 | ||||
-rw-r--r-- | drivers/char/watchdog/pcwd_usb.c | 5 | ||||
-rw-r--r-- | drivers/char/watchdog/rm9k_wdt.c | 44 |
5 files changed, 28 insertions, 31 deletions
diff --git a/drivers/char/watchdog/at91rm9200_wdt.c b/drivers/char/watchdog/at91rm9200_wdt.c index cb86967e2c5f..38bd37372599 100644 --- a/drivers/char/watchdog/at91rm9200_wdt.c +++ b/drivers/char/watchdog/at91rm9200_wdt.c | |||
@@ -203,9 +203,9 @@ static int __init at91wdt_probe(struct platform_device *pdev) | |||
203 | { | 203 | { |
204 | int res; | 204 | int res; |
205 | 205 | ||
206 | if (at91wdt_miscdev.dev) | 206 | if (at91wdt_miscdev.parent) |
207 | return -EBUSY; | 207 | return -EBUSY; |
208 | at91wdt_miscdev.dev = &pdev->dev; | 208 | at91wdt_miscdev.parent = &pdev->dev; |
209 | 209 | ||
210 | res = misc_register(&at91wdt_miscdev); | 210 | res = misc_register(&at91wdt_miscdev); |
211 | if (res) | 211 | if (res) |
@@ -221,7 +221,7 @@ static int __exit at91wdt_remove(struct platform_device *pdev) | |||
221 | 221 | ||
222 | res = misc_deregister(&at91wdt_miscdev); | 222 | res = misc_deregister(&at91wdt_miscdev); |
223 | if (!res) | 223 | if (!res) |
224 | at91wdt_miscdev.dev = NULL; | 224 | at91wdt_miscdev.parent = NULL; |
225 | 225 | ||
226 | return res; | 226 | return res; |
227 | } | 227 | } |
diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c index 3404a9c67f08..e88947f8fe53 100644 --- a/drivers/char/watchdog/mpcore_wdt.c +++ b/drivers/char/watchdog/mpcore_wdt.c | |||
@@ -347,7 +347,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev) | |||
347 | goto err_free; | 347 | goto err_free; |
348 | } | 348 | } |
349 | 349 | ||
350 | mpcore_wdt_miscdev.dev = &dev->dev; | 350 | mpcore_wdt_miscdev.parent = &dev->dev; |
351 | ret = misc_register(&mpcore_wdt_miscdev); | 351 | ret = misc_register(&mpcore_wdt_miscdev); |
352 | if (ret) { | 352 | if (ret) { |
353 | dev_printk(KERN_ERR, _dev, "cannot register miscdev on minor=%d (err=%d)\n", | 353 | dev_printk(KERN_ERR, _dev, "cannot register miscdev on minor=%d (err=%d)\n", |
diff --git a/drivers/char/watchdog/omap_wdt.c b/drivers/char/watchdog/omap_wdt.c index 5dbd7dc2936f..6c6f97332dbb 100644 --- a/drivers/char/watchdog/omap_wdt.c +++ b/drivers/char/watchdog/omap_wdt.c | |||
@@ -290,7 +290,7 @@ static int __init omap_wdt_probe(struct platform_device *pdev) | |||
290 | omap_wdt_disable(); | 290 | omap_wdt_disable(); |
291 | omap_wdt_adjust_timeout(timer_margin); | 291 | omap_wdt_adjust_timeout(timer_margin); |
292 | 292 | ||
293 | omap_wdt_miscdev.dev = &pdev->dev; | 293 | omap_wdt_miscdev.parent = &pdev->dev; |
294 | ret = misc_register(&omap_wdt_miscdev); | 294 | ret = misc_register(&omap_wdt_miscdev); |
295 | if (ret) | 295 | if (ret) |
296 | goto fail; | 296 | goto fail; |
diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index 61138726b501..2da5ac99687c 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
43 | #include <linux/usb.h> | 43 | #include <linux/usb.h> |
44 | #include <linux/mutex.h> | 44 | #include <linux/mutex.h> |
45 | #include <linux/hid.h> /* For HID_REQ_SET_REPORT & HID_DT_REPORT */ | ||
45 | 46 | ||
46 | 47 | ||
47 | #ifdef CONFIG_USB_DEBUG | 48 | #ifdef CONFIG_USB_DEBUG |
@@ -109,10 +110,6 @@ MODULE_DEVICE_TABLE (usb, usb_pcwd_table); | |||
109 | #define CMD_ENABLE_WATCHDOG 0x30 /* Enable / Disable Watchdog */ | 110 | #define CMD_ENABLE_WATCHDOG 0x30 /* Enable / Disable Watchdog */ |
110 | #define CMD_DISABLE_WATCHDOG CMD_ENABLE_WATCHDOG | 111 | #define CMD_DISABLE_WATCHDOG CMD_ENABLE_WATCHDOG |
111 | 112 | ||
112 | /* Some defines that I like to be somewhere else like include/linux/usb_hid.h */ | ||
113 | #define HID_REQ_SET_REPORT 0x09 | ||
114 | #define HID_DT_REPORT (USB_TYPE_CLASS | 0x02) | ||
115 | |||
116 | /* We can only use 1 card due to the /dev/watchdog restriction */ | 113 | /* We can only use 1 card due to the /dev/watchdog restriction */ |
117 | static int cards_found; | 114 | static int cards_found; |
118 | 115 | ||
diff --git a/drivers/char/watchdog/rm9k_wdt.c b/drivers/char/watchdog/rm9k_wdt.c index ec3909371c21..7576a13e86bc 100644 --- a/drivers/char/watchdog/rm9k_wdt.c +++ b/drivers/char/watchdog/rm9k_wdt.c | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | 48 | ||
49 | /* Function prototypes */ | 49 | /* Function prototypes */ |
50 | static irqreturn_t wdt_gpi_irqhdl(int, void *, struct pt_regs *); | 50 | static irqreturn_t wdt_gpi_irqhdl(int, void *); |
51 | static void wdt_gpi_start(void); | 51 | static void wdt_gpi_start(void); |
52 | static void wdt_gpi_stop(void); | 52 | static void wdt_gpi_stop(void); |
53 | static void wdt_gpi_set_timeout(unsigned int); | 53 | static void wdt_gpi_set_timeout(unsigned int); |
@@ -94,8 +94,28 @@ module_param(nowayout, bool, 0444); | |||
94 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be disabled once started"); | 94 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be disabled once started"); |
95 | 95 | ||
96 | 96 | ||
97 | /* Kernel interfaces */ | ||
98 | static struct file_operations fops = { | ||
99 | .owner = THIS_MODULE, | ||
100 | .open = wdt_gpi_open, | ||
101 | .release = wdt_gpi_release, | ||
102 | .write = wdt_gpi_write, | ||
103 | .unlocked_ioctl = wdt_gpi_ioctl, | ||
104 | }; | ||
105 | |||
106 | static struct miscdevice miscdev = { | ||
107 | .minor = WATCHDOG_MINOR, | ||
108 | .name = wdt_gpi_name, | ||
109 | .fops = &fops, | ||
110 | }; | ||
111 | |||
112 | static struct notifier_block wdt_gpi_shutdown = { | ||
113 | .notifier_call = wdt_gpi_notify, | ||
114 | }; | ||
115 | |||
116 | |||
97 | /* Interrupt handler */ | 117 | /* Interrupt handler */ |
98 | static irqreturn_t wdt_gpi_irqhdl(int irq, void *ctxt, struct pt_regs *regs) | 118 | static irqreturn_t wdt_gpi_irqhdl(int irq, void *ctxt) |
99 | { | 119 | { |
100 | if (!unlikely(__raw_readl(wd_regs + 0x0008) & 0x1)) | 120 | if (!unlikely(__raw_readl(wd_regs + 0x0008) & 0x1)) |
101 | return IRQ_NONE; | 121 | return IRQ_NONE; |
@@ -312,26 +332,6 @@ wdt_gpi_notify(struct notifier_block *this, unsigned long code, void *unused) | |||
312 | } | 332 | } |
313 | 333 | ||
314 | 334 | ||
315 | /* Kernel interfaces */ | ||
316 | static struct file_operations fops = { | ||
317 | .owner = THIS_MODULE, | ||
318 | .open = wdt_gpi_open, | ||
319 | .release = wdt_gpi_release, | ||
320 | .write = wdt_gpi_write, | ||
321 | .unlocked_ioctl = wdt_gpi_ioctl, | ||
322 | }; | ||
323 | |||
324 | static struct miscdevice miscdev = { | ||
325 | .minor = WATCHDOG_MINOR, | ||
326 | .name = wdt_gpi_name, | ||
327 | .fops = &fops, | ||
328 | }; | ||
329 | |||
330 | static struct notifier_block wdt_gpi_shutdown = { | ||
331 | .notifier_call = wdt_gpi_notify, | ||
332 | }; | ||
333 | |||
334 | |||
335 | /* Init & exit procedures */ | 335 | /* Init & exit procedures */ |
336 | static const struct resource * | 336 | static const struct resource * |
337 | wdt_gpi_get_resource(struct platform_device *pdv, const char *name, | 337 | wdt_gpi_get_resource(struct platform_device *pdv, const char *name, |