327 return NOTIFY_DONE;
328}
329
330
331
332
333
334
335static struct notifier_block wdt_notifier = {
336 .notifier_call = wdt_notify_sys,
337};
338
339static void __exit alim7101_wdt_unload(void)
340{
341 wdt_turnoff();
342
343 misc_deregister(&wdt_miscdev);
344 unregister_reboot_notifier(&wdt_notifier);
345 pci_dev_put(alim7101_pmu);
346}
347
348static int __init alim7101_wdt_init(void)
349{
350 int rc = -EBUSY;
351 struct pci_dev *ali1543_south;
352 char tmp;
353
354 printk(KERN_INFO PFX "Steve Hill <steve@navaho.co.uk>.\n");
355 alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,
356 NULL);
357 if (!alim7101_pmu) {
358 printk(KERN_INFO PFX "ALi M7101 PMU not present - WDT not set\n");
359 return -EBUSY;
360 }
361
362
363 pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, 0x02);
364
365 ali1543_south = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533,
366 NULL);
367 if (!ali1543_south) {