Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4ebf0c49
Commit
4ebf0c49
authored
Aug 01, 2004
by
Patrick Mochel
Committed by
Patrick Mochel
Aug 01, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Power Mgmt] Make sure we shutdown devices on shutdown and reboot..
parent
11700b3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
kernel/power/disk.c
kernel/power/disk.c
+4
-1
No files found.
kernel/power/disk.c
View file @
4ebf0c49
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include <linux/syscalls.h>
#include <linux/syscalls.h>
#include <linux/reboot.h>
#include <linux/reboot.h>
#include <linux/string.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/fs.h>
#include "power.h"
#include "power.h"
...
@@ -46,16 +47,18 @@ static int power_down(u32 mode)
...
@@ -46,16 +47,18 @@ static int power_down(u32 mode)
int
error
=
0
;
int
error
=
0
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
device_power_down
(
PM_SUSPEND_DISK
);
switch
(
mode
)
{
switch
(
mode
)
{
case
PM_DISK_PLATFORM
:
case
PM_DISK_PLATFORM
:
device_power_down
(
PM_SUSPEND_DISK
);
error
=
pm_ops
->
enter
(
PM_SUSPEND_DISK
);
error
=
pm_ops
->
enter
(
PM_SUSPEND_DISK
);
break
;
break
;
case
PM_DISK_SHUTDOWN
:
case
PM_DISK_SHUTDOWN
:
printk
(
"Powering off system
\n
"
);
printk
(
"Powering off system
\n
"
);
device_shutdown
();
machine_power_off
();
machine_power_off
();
break
;
break
;
case
PM_DISK_REBOOT
:
case
PM_DISK_REBOOT
:
device_shutdown
();
machine_restart
(
NULL
);
machine_restart
(
NULL
);
break
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment