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)
378
378
pci_disable_device (dev );
379
379
}
380
380
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
+
381
401
static struct pci_driver hpwdt_driver = {
382
402
.name = "hpwdt" ,
383
403
.id_table = hpwdt_devices ,
384
404
.probe = hpwdt_init_one ,
385
405
.remove = hpwdt_exit ,
406
+
407
+ .driver = {
408
+ .name = "hpwdt" ,
409
+ .pm = & hpwdt_pm_ops ,
410
+ }
386
411
};
387
412
388
413
MODULE_AUTHOR ("Tom Mingarelli" );
You can’t perform that action at this time.
0 commit comments