File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -378,11 +378,36 @@ static void hpwdt_exit(struct pci_dev *dev)
378378 pci_disable_device (dev );
379379}
380380
381+ static int hpwdt_suspend (struct device * dev )
382+ {
383+ if (watchdog_active (& hpwdt_dev ))
384+ hpwdt_stop ();
385+
386+ return 0 ;
387+ }
388+
389+ static int hpwdt_resume (struct device * dev )
390+ {
391+ if (watchdog_active (& hpwdt_dev ))
392+ hpwdt_start (& hpwdt_dev );
393+
394+ return 0 ;
395+ }
396+
397+ static const struct dev_pm_ops hpwdt_pm_ops = {
398+ LATE_SYSTEM_SLEEP_PM_OPS (hpwdt_suspend , hpwdt_resume )
399+ };
400+
381401static struct pci_driver hpwdt_driver = {
382402 .name = "hpwdt" ,
383403 .id_table = hpwdt_devices ,
384404 .probe = hpwdt_init_one ,
385405 .remove = hpwdt_exit ,
406+
407+ .driver = {
408+ .name = "hpwdt" ,
409+ .pm = & hpwdt_pm_ops ,
410+ }
386411};
387412
388413MODULE_AUTHOR ("Tom Mingarelli" );
You can’t perform that action at this time.
0 commit comments