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
aaf7cec2
Commit
aaf7cec2
authored
Jun 21, 2006
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Add of_find_node_by_{name,type}().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
372b07bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
arch/sparc64/kernel/prom.c
arch/sparc64/kernel/prom.c
+26
-0
include/asm-sparc64/prom.h
include/asm-sparc64/prom.h
+10
-0
No files found.
arch/sparc64/kernel/prom.c
View file @
aaf7cec2
...
@@ -63,6 +63,32 @@ struct device_node *of_find_node_by_path(const char *path)
...
@@ -63,6 +63,32 @@ struct device_node *of_find_node_by_path(const char *path)
return
np
;
return
np
;
}
}
struct
device_node
*
of_find_node_by_name
(
struct
device_node
*
from
,
const
char
*
name
)
{
struct
device_node
*
np
;
np
=
from
?
from
->
allnext
:
allnodes
;
for
(;
np
!=
NULL
;
np
=
np
->
allnext
)
if
(
np
->
name
!=
NULL
&&
strcmp
(
np
->
name
,
name
)
==
0
)
break
;
return
np
;
}
struct
device_node
*
of_find_node_by_type
(
struct
device_node
*
from
,
const
char
*
type
)
{
struct
device_node
*
np
;
np
=
from
?
from
->
allnext
:
allnodes
;
for
(;
np
!=
0
;
np
=
np
->
allnext
)
if
(
np
->
type
!=
0
&&
strcmp
(
np
->
type
,
type
)
==
0
)
break
;
return
np
;
}
struct
property
*
of_find_property
(
struct
device_node
*
np
,
const
char
*
name
,
struct
property
*
of_find_property
(
struct
device_node
*
np
,
const
char
*
name
,
int
*
lenp
)
int
*
lenp
)
{
{
...
...
include/asm-sparc64/prom.h
View file @
aaf7cec2
...
@@ -65,6 +65,16 @@ static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_e
...
@@ -65,6 +65,16 @@ static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_e
dn
->
pde
=
de
;
dn
->
pde
=
de
;
}
}
extern
struct
device_node
*
of_find_node_by_name
(
struct
device_node
*
from
,
const
char
*
name
);
#define for_each_node_by_name(dn, name) \
for (dn = of_find_node_by_name(NULL, name); dn; \
dn = of_find_node_by_name(dn, name))
extern
struct
device_node
*
of_find_node_by_type
(
struct
device_node
*
from
,
const
char
*
type
);
#define for_each_node_by_type(dn, type) \
for (dn = of_find_node_by_type(NULL, type); dn; \
dn = of_find_node_by_type(dn, type))
extern
struct
device_node
*
of_find_node_by_path
(
const
char
*
path
);
extern
struct
device_node
*
of_find_node_by_path
(
const
char
*
path
);
extern
struct
device_node
*
of_get_parent
(
const
struct
device_node
*
node
);
extern
struct
device_node
*
of_get_parent
(
const
struct
device_node
*
node
);
extern
struct
device_node
*
of_get_next_child
(
const
struct
device_node
*
node
,
extern
struct
device_node
*
of_get_next_child
(
const
struct
device_node
*
node
,
...
...
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