diff --git a/apex_driver.c b/apex_driver.c index b25f763..130b1b8 100644 --- a/apex_driver.c +++ b/apex_driver.c @@ -311,7 +311,7 @@ module_init(apex_init); module_exit(apex_exit); /* Allows device to enter power save upon driver close(). */ -static int allow_power_save; +static int allow_power_save = 1; /* Allows SW based clock gating. */ static int allow_sw_clock_gating; diff --git a/gasket_core.c b/gasket_core.c index 0d5ba73..c1c9276 100644 --- a/gasket_core.c +++ b/gasket_core.c @@ -620,6 +620,16 @@ static int gasket_pci_probe( goto fail5; } + if (driver_desc->device_close_cb) { + /* Perform a device cleanup, so as to place it in Power Save + * Mode. */ + ret = driver_desc->device_close_cb(gasket_dev); + if (ret) { + gasket_log_error( + gasket_dev, "Device cleanup cb returned %d.", ret); + } + } + return 0; fail5: