diff options
Diffstat (limited to 'kernel/power/user.c')
-rw-r--r-- | kernel/power/user.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c index 040560d9c312..24d7d78e6f42 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
@@ -130,16 +130,16 @@ static inline int platform_prepare(void) | |||
130 | { | 130 | { |
131 | int error = 0; | 131 | int error = 0; |
132 | 132 | ||
133 | if (pm_ops && pm_ops->prepare) | 133 | if (hibernation_ops) |
134 | error = pm_ops->prepare(PM_SUSPEND_DISK); | 134 | error = hibernation_ops->prepare(); |
135 | 135 | ||
136 | return error; | 136 | return error; |
137 | } | 137 | } |
138 | 138 | ||
139 | static inline void platform_finish(void) | 139 | static inline void platform_finish(void) |
140 | { | 140 | { |
141 | if (pm_ops && pm_ops->finish) | 141 | if (hibernation_ops) |
142 | pm_ops->finish(PM_SUSPEND_DISK); | 142 | hibernation_ops->finish(); |
143 | } | 143 | } |
144 | 144 | ||
145 | static inline int snapshot_suspend(int platform_suspend) | 145 | static inline int snapshot_suspend(int platform_suspend) |
@@ -384,7 +384,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
384 | switch (arg) { | 384 | switch (arg) { |
385 | 385 | ||
386 | case PMOPS_PREPARE: | 386 | case PMOPS_PREPARE: |
387 | if (pm_ops && pm_ops->enter) { | 387 | if (hibernation_ops) { |
388 | data->platform_suspend = 1; | 388 | data->platform_suspend = 1; |
389 | error = 0; | 389 | error = 0; |
390 | } else { | 390 | } else { |
@@ -395,8 +395,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
395 | case PMOPS_ENTER: | 395 | case PMOPS_ENTER: |
396 | if (data->platform_suspend) { | 396 | if (data->platform_suspend) { |
397 | kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); | 397 | kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); |
398 | error = pm_ops->enter(PM_SUSPEND_DISK); | 398 | error = hibernation_ops->enter(); |
399 | error = 0; | ||
400 | } | 399 | } |
401 | break; | 400 | break; |
402 | 401 | ||