Commit 699a5bbe authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] move watchdogs to __module_get now it exists

(Jan Dittmer)

Also add the 82801EB/ER 	(Wim Van Sebroeck)
parent c42189bb
......@@ -143,7 +143,7 @@ static int acq_open(struct inode *inode, struct file *file)
return -EBUSY;
}
if (nowayout)
MOD_INC_USE_COUNT;
__module_get(THIS_MODULE);
/* Activate */
acq_is_open=1;
......
......@@ -25,7 +25,8 @@
* 82801AA & 82801AB chip : document number 290655-003, 290677-004,
* 82801BA & 82801BAM chip : document number 290687-002, 298242-005,
* 82801CA & 82801CAM chip : document number 290716-001, 290718-001,
* 82801DB & 82801E chip : document number 290744-001, 273599-001
* 82801DB & 82801E chip : document number 290744-001, 273599-001,
* 82801EB & 82801ER chip : document number 252516-001
*
* 20000710 Nils Faerber
* Initial Version 0.01
......@@ -42,9 +43,11 @@
* clean up ioctls (WDIOC_GETSTATUS, WDIOC_GETBOOTSTATUS and
* WDIOC_SETOPTIONS), made i810tco_getdevice __init,
* removed boot_status, removed tco_timer_read,
* added support for 82801DB and 82801E chipset, general cleanup.
* added support for 82801DB and 82801E chipset,
* added support for 82801EB and 8280ER chipset,
* general cleanup.
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
......@@ -164,7 +167,7 @@ static int tco_timer_settimer (unsigned char tmrval)
* Reload (trigger) the timer. Lock is needed so we don't reload it during
* a reprogramming event
*/
static void tco_timer_reload (void)
{
spin_lock(&tco_lock);
......@@ -307,6 +310,7 @@ static struct pci_device_id i810tco_pci_tbl[] __initdata = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, PCI_ANY_ID, PCI_ANY_ID, },
{ 0, },
};
MODULE_DEVICE_TABLE (pci, i810tco_pci_tbl);
......
/*
* i810-tco 0.05: TCO timer driver for i8xx chipsets
* i810-tco: TCO timer driver for i8xx chipsets
*
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights Reserved.
* http://www.kernelconcepts.de
......@@ -8,7 +8,7 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
*
* Neither kernel concepts nor Nils Faerber admit liability nor provide
* warranty for any of this software. This material is provided
* "AS-IS" and at no charge.
......
......@@ -230,7 +230,7 @@ ibwdt_open(struct inode *inode, struct file *file)
return -EBUSY;
}
if (nowayout)
MOD_INC_USE_COUNT;
__module_get(THIS_MODULE);
/* Activate */
ibwdt_is_open = 1;
......
......@@ -54,7 +54,7 @@ static int indydog_open(struct inode *inode, struct file *file)
return -EBUSY;
if (nowayout)
MOD_INC_USE_COUNT;
__module_get(THIS_MODULE);
/*
* Activate timer
......
......@@ -392,7 +392,7 @@ static int zf_open(struct inode *inode, struct file *file)
}
if (nowayout)
MOD_INC_USE_COUNT;
__module_get(THIS_MODULE);
zf_is_open = 1;
......
......@@ -431,7 +431,7 @@ static int pcwd_open(struct inode *ino, struct file *filep)
atomic_inc( &open_allowed );
return -EBUSY;
}
MOD_INC_USE_COUNT;
__module_get(THIS_MODULE);
/* Enable the port */
if (revision == PCWD_REVISION_C) {
spin_lock(&io_lock);
......
......@@ -207,9 +207,8 @@ static int fop_open(struct inode * inode, struct file * file)
/* Just in case we're already talking to someone... */
if(wdt_is_open)
return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
}
if (nowayout)
__module_get(THIS_MODULE);
/* Good, fire up the show */
wdt_is_open = 1;
wdt_startup();
......
......@@ -231,7 +231,7 @@ static int fop_open(struct inode * inode, struct file * file)
/* Good, fire up the show */
wdt_startup();
if (nowayout)
MOD_INC_USE_COUNT;
__module_get(THIS_MODULE);
return 0;
default:
......
......@@ -189,9 +189,8 @@ static int sh_wdt_open(struct inode *inode, struct file *file)
if (test_and_set_bit(0, &sh_is_open))
return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
}
if (nowayout)
__module_get(THIS_MODULE);
sh_wdt_start();
......
......@@ -104,9 +104,8 @@ static int softdog_open(struct inode *inode, struct file *file)
{
if(test_and_set_bit(0, &timer_alive))
return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
}
if (nowayout)
__module_get(THIS_MODULE);
/*
* Activate timer
*/
......
......@@ -99,7 +99,7 @@ static int wdt977_open(struct inode *inode, struct file *file)
if (nowayout)
{
MOD_INC_USE_COUNT;
__module_get(THIS_MODULE);
/* do not permit disabling the watchdog by writing 0 to reg. 0xF2 */
if (!timeoutM) timeoutM = DEFAULT_TIMEOUT;
......
......@@ -367,7 +367,7 @@ static int wdtpci_open(struct inode *inode, struct file *file)
return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
__module_get(THIS_MODULE);
}
/*
* Activate
......
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