diff options
-rw-r--r-- | drivers/devfreq/devfreq.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 5db7249b89d9..2a08edca35ad 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -23,6 +23,7 @@ #include <linux/devfreq.h> #include <linux/workqueue.h> #include <linux/platform_device.h> +#include <linux/syscore_ops.h> #include <linux/list.h> #include <linux/printk.h> #include <linux/hrtimer.h> @@ -1421,6 +1422,10 @@ static struct attribute *devfreq_attrs[] = { }; ATTRIBUTE_GROUPS(devfreq); +static struct syscore_ops devfreq_syscore_ops = { + .shutdown = devfreq_suspend, +}; + static int __init devfreq_init(void) { devfreq_class = class_create(THIS_MODULE, "devfreq"); @@ -1437,6 +1442,8 @@ static int __init devfreq_init(void) } devfreq_class->dev_groups = devfreq_groups; + register_syscore_ops(&devfreq_syscore_ops); + return 0; } subsys_initcall(devfreq_init); |