File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -390,8 +390,7 @@ static int pwm_fan_probe(struct platform_device *pdev)
390
390
return 0 ;
391
391
}
392
392
393
- #ifdef CONFIG_PM_SLEEP
394
- static int pwm_fan_suspend (struct device * dev )
393
+ static int pwm_fan_disable (struct device * dev )
395
394
{
396
395
struct pwm_fan_ctx * ctx = dev_get_drvdata (dev );
397
396
struct pwm_args args ;
@@ -418,6 +417,17 @@ static int pwm_fan_suspend(struct device *dev)
418
417
return 0 ;
419
418
}
420
419
420
+ static void pwm_fan_shutdown (struct platform_device * pdev )
421
+ {
422
+ pwm_fan_disable (& pdev -> dev );
423
+ }
424
+
425
+ #ifdef CONFIG_PM_SLEEP
426
+ static int pwm_fan_suspend (struct device * dev )
427
+ {
428
+ return pwm_fan_disable (dev );
429
+ }
430
+
421
431
static int pwm_fan_resume (struct device * dev )
422
432
{
423
433
struct pwm_fan_ctx * ctx = dev_get_drvdata (dev );
@@ -455,6 +465,7 @@ MODULE_DEVICE_TABLE(of, of_pwm_fan_match);
455
465
456
466
static struct platform_driver pwm_fan_driver = {
457
467
.probe = pwm_fan_probe ,
468
+ .shutdown = pwm_fan_shutdown ,
458
469
.driver = {
459
470
.name = "pwm-fan" ,
460
471
.pm = & pwm_fan_pm ,
You can’t perform that action at this time.
0 commit comments