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
8f66ebaf
Commit
8f66ebaf
authored
Dec 21, 2002
by
James Bottomley
Committed by
Linus Torvalds
Dec 21, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow pci primary busses to have parents in the device model
parent
1ebad6d8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
drivers/pci/probe.c
drivers/pci/probe.c
+4
-3
include/linux/pci.h
include/linux/pci.h
+10
-2
No files found.
drivers/pci/probe.c
View file @
8f66ebaf
...
...
@@ -548,7 +548,7 @@ int __devinit pci_bus_exists(const struct list_head *list, int nr)
return
0
;
}
struct
pci_bus
*
__devinit
pci_alloc_primary_bus
(
int
bus
)
struct
pci_bus
*
__devinit
pci_alloc_primary_bus
_parented
(
struct
device
*
parent
,
int
bus
)
{
struct
pci_bus
*
b
;
...
...
@@ -567,6 +567,7 @@ struct pci_bus * __devinit pci_alloc_primary_bus(int bus)
memset
(
b
->
dev
,
0
,
sizeof
(
*
(
b
->
dev
)));
sprintf
(
b
->
dev
->
bus_id
,
"pci%d"
,
bus
);
strcpy
(
b
->
dev
->
name
,
"Host/PCI Bridge"
);
b
->
dev
->
parent
=
parent
;
device_register
(
b
->
dev
);
b
->
number
=
b
->
secondary
=
bus
;
...
...
@@ -575,9 +576,9 @@ struct pci_bus * __devinit pci_alloc_primary_bus(int bus)
return
b
;
}
struct
pci_bus
*
__devinit
pci_scan_bus
(
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
)
struct
pci_bus
*
__devinit
pci_scan_bus
_parented
(
struct
device
*
parent
,
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
)
{
struct
pci_bus
*
b
=
pci_alloc_primary_bus
(
bus
);
struct
pci_bus
*
b
=
pci_alloc_primary_bus
_parented
(
parent
,
bus
);
if
(
b
)
{
b
->
sysdata
=
sysdata
;
b
->
ops
=
ops
;
...
...
include/linux/pci.h
View file @
8f66ebaf
...
...
@@ -558,8 +558,16 @@ void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *);
/* Generic PCI functions used internally */
int
pci_bus_exists
(
const
struct
list_head
*
list
,
int
nr
);
struct
pci_bus
*
pci_scan_bus
(
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
);
struct
pci_bus
*
pci_alloc_primary_bus
(
int
bus
);
struct
pci_bus
*
pci_scan_bus_parented
(
struct
device
*
parent
,
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
);
static
inline
struct
pci_bus
*
pci_scan_bus
(
int
bus
,
struct
pci_ops
*
ops
,
void
*
sysdata
)
{
return
pci_scan_bus_parented
(
NULL
,
bus
,
ops
,
sysdata
);
}
struct
pci_bus
*
pci_alloc_primary_bus_parented
(
struct
device
*
parent
,
int
bus
);
static
inline
struct
pci_bus
*
pci_alloc_primary_bus
(
int
bus
)
{
return
pci_alloc_primary_bus_parented
(
NULL
,
bus
);
}
struct
pci_dev
*
pci_scan_slot
(
struct
pci_dev
*
temp
);
int
pci_proc_attach_device
(
struct
pci_dev
*
dev
);
int
pci_proc_detach_device
(
struct
pci_dev
*
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