diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/gpio-fan.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c index 7802eb2a442f..36abf814b8c7 100644 --- a/drivers/hwmon/gpio-fan.c +++ b/drivers/hwmon/gpio-fan.c | |||
@@ -550,6 +550,14 @@ static int gpio_fan_probe(struct platform_device *pdev) | |||
550 | return 0; | 550 | return 0; |
551 | } | 551 | } |
552 | 552 | ||
553 | static void gpio_fan_shutdown(struct platform_device *pdev) | ||
554 | { | ||
555 | struct gpio_fan_data *fan_data = dev_get_drvdata(&pdev->dev); | ||
556 | |||
557 | if (fan_data->ctrl) | ||
558 | set_fan_speed(fan_data, 0); | ||
559 | } | ||
560 | |||
553 | #ifdef CONFIG_PM_SLEEP | 561 | #ifdef CONFIG_PM_SLEEP |
554 | static int gpio_fan_suspend(struct device *dev) | 562 | static int gpio_fan_suspend(struct device *dev) |
555 | { | 563 | { |
@@ -581,6 +589,7 @@ static SIMPLE_DEV_PM_OPS(gpio_fan_pm, gpio_fan_suspend, gpio_fan_resume); | |||
581 | 589 | ||
582 | static struct platform_driver gpio_fan_driver = { | 590 | static struct platform_driver gpio_fan_driver = { |
583 | .probe = gpio_fan_probe, | 591 | .probe = gpio_fan_probe, |
592 | .shutdown = gpio_fan_shutdown, | ||
584 | .driver = { | 593 | .driver = { |
585 | .name = "gpio-fan", | 594 | .name = "gpio-fan", |
586 | .pm = GPIO_FAN_PM, | 595 | .pm = GPIO_FAN_PM, |