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
86372d54
Commit
86372d54
authored
Jul 15, 2003
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Fix locking [8/11]
Split up cpufreq_governor into a locking and non-locking variant.
parent
e45335e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
kernel/cpufreq.c
kernel/cpufreq.c
+15
-7
No files found.
kernel/cpufreq.c
View file @
86372d54
...
...
@@ -608,15 +608,9 @@ int cpufreq_driver_target(struct cpufreq_policy *policy,
EXPORT_SYMBOL_GPL
(
cpufreq_driver_target
);
int
cpufreq_governor
(
unsigned
int
cpu
,
unsigned
int
event
)
static
int
__cpufreq_governor
(
struct
cpufreq_policy
*
policy
,
unsigned
int
event
)
{
int
ret
=
0
;
struct
cpufreq_policy
*
policy
=
cpufreq_cpu_get
(
cpu
);
if
(
!
policy
)
return
-
EINVAL
;
down
(
&
policy
->
lock
);
switch
(
policy
->
policy
)
{
case
CPUFREQ_POLICY_POWERSAVE
:
...
...
@@ -644,6 +638,20 @@ int cpufreq_governor(unsigned int cpu, unsigned int event)
ret
=
-
EINVAL
;
}
return
ret
;
}
int
cpufreq_governor
(
unsigned
int
cpu
,
unsigned
int
event
)
{
int
ret
=
0
;
struct
cpufreq_policy
*
policy
=
cpufreq_cpu_get
(
cpu
);
if
(
!
policy
)
return
-
EINVAL
;
down
(
&
policy
->
lock
);
ret
=
__cpufreq_governor
(
policy
,
event
);
up
(
&
policy
->
lock
);
cpufreq_cpu_put
(
policy
);
...
...
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