/* Module and version information */
#define WATCHDOG_VERSION "1.00"
-#define WATCHDOG_DATE "09/02/2004"
+#define WATCHDOG_DATE "13/03/2004"
#define WATCHDOG_DRIVER_NAME "PCI-PC Watchdog"
#define WATCHDOG_NAME "pcwd_pci"
#define PFX WATCHDOG_NAME ": "
#define CMD_READ_WATCHDOG_TIMEOUT 0x18
#define CMD_WRITE_WATCHDOG_TIMEOUT 0x19
+/* We can only use 1 card due to the /dev/watchdog restriction */
+static int cards_found;
+
/* internal variables */
static int temp_panic;
static unsigned long is_active;
static int __devinit pcipcwd_card_init(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
- static int cards_found;
int ret = -EIO;
int got_fw_rev, fw_rev_major, fw_rev_minor;
char fw_ver_str[20];
if (pci_resource_start(pdev, 0) == 0x0000) {
printk(KERN_ERR PFX "No I/O-Address for card detected\n");
- return -ENODEV;
+ ret = -ENODEV;
+ goto err_out_disable_device;
}
pcipcwd_private.pdev = pdev;
unregister_reboot_notifier(&pcipcwd_notifier);
pci_release_regions(pdev);
pci_disable_device(pdev);
+ cards_found--;
}
static struct pci_device_id pcipcwd_pci_tbl[] = {