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
5a86dc1a
Commit
5a86dc1a
authored
Apr 14, 2009
by
Michal Simek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
microblaze: struct device - replace bus_id with dev_name()
Signed-off-by:
Michal Simek
<
monstr@monstr.eu
>
parent
a8fb748e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
arch/microblaze/kernel/of_device.c
arch/microblaze/kernel/of_device.c
+4
-6
No files found.
arch/microblaze/kernel/of_device.c
View file @
5a86dc1a
...
@@ -13,7 +13,6 @@ void of_device_make_bus_id(struct of_device *dev)
...
@@ -13,7 +13,6 @@ void of_device_make_bus_id(struct of_device *dev)
{
{
static
atomic_t
bus_no_reg_magic
;
static
atomic_t
bus_no_reg_magic
;
struct
device_node
*
node
=
dev
->
node
;
struct
device_node
*
node
=
dev
->
node
;
char
*
name
=
dev
->
dev
.
bus_id
;
const
u32
*
reg
;
const
u32
*
reg
;
u64
addr
;
u64
addr
;
int
magic
;
int
magic
;
...
@@ -25,9 +24,8 @@ void of_device_make_bus_id(struct of_device *dev)
...
@@ -25,9 +24,8 @@ void of_device_make_bus_id(struct of_device *dev)
if
(
reg
)
{
if
(
reg
)
{
addr
=
of_translate_address
(
node
,
reg
);
addr
=
of_translate_address
(
node
,
reg
);
if
(
addr
!=
OF_BAD_ADDR
)
{
if
(
addr
!=
OF_BAD_ADDR
)
{
snprintf
(
name
,
BUS_ID_SIZE
,
dev_set_name
(
&
dev
->
dev
,
"%llx.%s"
,
"%llx.%s"
,
(
unsigned
long
long
)
addr
,
(
unsigned
long
long
)
addr
,
node
->
name
);
node
->
name
);
return
;
return
;
}
}
}
}
...
@@ -37,7 +35,7 @@ void of_device_make_bus_id(struct of_device *dev)
...
@@ -37,7 +35,7 @@ void of_device_make_bus_id(struct of_device *dev)
* counter (and pray...)
* counter (and pray...)
*/
*/
magic
=
atomic_add_return
(
1
,
&
bus_no_reg_magic
);
magic
=
atomic_add_return
(
1
,
&
bus_no_reg_magic
);
snprintf
(
name
,
BUS_ID_SIZE
,
"%s.%d"
,
node
->
name
,
magic
-
1
);
dev_set_name
(
&
dev
->
dev
,
"%s.%d"
,
node
->
name
,
magic
-
1
);
}
}
EXPORT_SYMBOL
(
of_device_make_bus_id
);
EXPORT_SYMBOL
(
of_device_make_bus_id
);
...
@@ -58,7 +56,7 @@ struct of_device *of_device_alloc(struct device_node *np,
...
@@ -58,7 +56,7 @@ struct of_device *of_device_alloc(struct device_node *np,
dev
->
dev
.
archdata
.
of_node
=
np
;
dev
->
dev
.
archdata
.
of_node
=
np
;
if
(
bus_id
)
if
(
bus_id
)
strlcpy
(
dev
->
dev
.
bus_id
,
bus_id
,
BUS_ID_SIZE
);
dev_set_name
(
&
dev
->
dev
,
bus_id
);
else
else
of_device_make_bus_id
(
dev
);
of_device_make_bus_id
(
dev
);
...
...
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