Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
8fc55a5b
Commit
8fc55a5b
authored
Feb 09, 2006
by
Tony Lindgren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: OMAP: Add error checking to clock functions
Add error checking to clock functions
parent
202b883f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/clock.c
+12
-0
No files found.
arch/arm/plat-omap/clock.c
View file @
8fc55a5b
...
@@ -59,6 +59,9 @@ int clk_enable(struct clk *clk)
...
@@ -59,6 +59,9 @@ int clk_enable(struct clk *clk)
unsigned
long
flags
;
unsigned
long
flags
;
int
ret
=
0
;
int
ret
=
0
;
if
(
clk
==
NULL
||
IS_ERR
(
clk
))
return
-
ENODEV
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
if
(
arch_clock
->
clk_enable
)
if
(
arch_clock
->
clk_enable
)
ret
=
arch_clock
->
clk_enable
(
clk
);
ret
=
arch_clock
->
clk_enable
(
clk
);
...
@@ -72,6 +75,9 @@ void clk_disable(struct clk *clk)
...
@@ -72,6 +75,9 @@ void clk_disable(struct clk *clk)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
if
(
clk
==
NULL
||
IS_ERR
(
clk
))
return
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
if
(
arch_clock
->
clk_disable
)
if
(
arch_clock
->
clk_disable
)
arch_clock
->
clk_disable
(
clk
);
arch_clock
->
clk_disable
(
clk
);
...
@@ -84,6 +90,9 @@ int clk_get_usecount(struct clk *clk)
...
@@ -84,6 +90,9 @@ int clk_get_usecount(struct clk *clk)
unsigned
long
flags
;
unsigned
long
flags
;
int
ret
=
0
;
int
ret
=
0
;
if
(
clk
==
NULL
||
IS_ERR
(
clk
))
return
0
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
ret
=
clk
->
usecount
;
ret
=
clk
->
usecount
;
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
...
@@ -97,6 +106,9 @@ unsigned long clk_get_rate(struct clk *clk)
...
@@ -97,6 +106,9 @@ unsigned long clk_get_rate(struct clk *clk)
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
long
ret
=
0
;
unsigned
long
ret
=
0
;
if
(
clk
==
NULL
||
IS_ERR
(
clk
))
return
0
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
ret
=
clk
->
rate
;
ret
=
clk
->
rate
;
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
...
...
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