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
nexedi
linux
Commits
fa449bd6
Commit
fa449bd6
authored
Apr 25, 2007
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[OPENPROM]: Use pci_device_to_OF_node().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
d297c31f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
drivers/sbus/char/openprom.c
drivers/sbus/char/openprom.c
+8
-10
No files found.
drivers/sbus/char/openprom.c
View file @
fa449bd6
...
...
@@ -44,7 +44,6 @@
#include <asm/openpromio.h>
#ifdef CONFIG_PCI
#include <linux/pci.h>
#include <asm/pbm.h>
#endif
MODULE_AUTHOR
(
"Thomas K. Dyas (tdyas@noc.rutgers.edu) and Eddie C. Dost (ecd@skynet.be)"
);
...
...
@@ -248,18 +247,17 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp
if
(
bufsize
>=
2
*
sizeof
(
int
))
{
#ifdef CONFIG_PCI
struct
pci_dev
*
pdev
;
struct
pcidev_cookie
*
pcp
;
struct
device_node
*
dp
;
pdev
=
pci_get_bus_and_slot
(((
int
*
)
op
->
oprom_array
)[
0
],
((
int
*
)
op
->
oprom_array
)[
1
]);
pcp
=
pdev
->
sysdata
;
if
(
pcp
!=
NULL
)
{
dp
=
pcp
->
prom_node
;
data
->
current_node
=
dp
;
*
((
int
*
)
op
->
oprom_array
)
=
dp
->
node
;
op
->
oprom_size
=
sizeof
(
int
);
err
=
copyout
(
argp
,
op
,
bufsize
+
sizeof
(
int
));
}
dp
=
pci_device_to_OF_node
(
pdev
);
data
->
current_node
=
dp
;
*
((
int
*
)
op
->
oprom_array
)
=
dp
->
node
;
op
->
oprom_size
=
sizeof
(
int
);
err
=
copyout
(
argp
,
op
,
bufsize
+
sizeof
(
int
));
pci_dev_put
(
pdev
);
#endif
}
...
...
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