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
8b120595
Commit
8b120595
authored
May 29, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PCI: Put pci_match_device back for the people that are still using it.
parent
f4ad044b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
drivers/pci/pci-driver.c
drivers/pci/pci-driver.c
+25
-0
No files found.
drivers/pci/pci-driver.c
View file @
8b120595
...
@@ -10,6 +10,30 @@
...
@@ -10,6 +10,30 @@
* Registration of PCI drivers and handling of hot-pluggable devices.
* Registration of PCI drivers and handling of hot-pluggable devices.
*/
*/
/**
* pci_match_device - Tell if a PCI device structure has a matching PCI device id structure
* @ids: array of PCI device id structures to search in
* @dev: the PCI device structure to match against
*
* Used by a driver to check whether a PCI device present in the
* system is in its list of supported devices.Returns the matching
* pci_device_id structure or %NULL if there is no match.
*/
const
struct
pci_device_id
*
pci_match_device
(
const
struct
pci_device_id
*
ids
,
const
struct
pci_dev
*
dev
)
{
while
(
ids
->
vendor
||
ids
->
subvendor
||
ids
->
class_mask
)
{
if
((
ids
->
vendor
==
PCI_ANY_ID
||
ids
->
vendor
==
dev
->
vendor
)
&&
(
ids
->
device
==
PCI_ANY_ID
||
ids
->
device
==
dev
->
device
)
&&
(
ids
->
subvendor
==
PCI_ANY_ID
||
ids
->
subvendor
==
dev
->
subsystem_vendor
)
&&
(
ids
->
subdevice
==
PCI_ANY_ID
||
ids
->
subdevice
==
dev
->
subsystem_device
)
&&
!
((
ids
->
class
^
dev
->
class
)
&
ids
->
class_mask
))
return
ids
;
ids
++
;
}
return
NULL
;
}
static
int
pci_device_probe
(
struct
device
*
dev
)
static
int
pci_device_probe
(
struct
device
*
dev
)
{
{
int
error
=
0
;
int
error
=
0
;
...
@@ -169,6 +193,7 @@ static int __init pci_driver_init(void)
...
@@ -169,6 +193,7 @@ static int __init pci_driver_init(void)
subsys_initcall
(
pci_driver_init
);
subsys_initcall
(
pci_driver_init
);
EXPORT_SYMBOL
(
pci_match_device
);
EXPORT_SYMBOL
(
pci_register_driver
);
EXPORT_SYMBOL
(
pci_register_driver
);
EXPORT_SYMBOL
(
pci_unregister_driver
);
EXPORT_SYMBOL
(
pci_unregister_driver
);
EXPORT_SYMBOL
(
pci_dev_driver
);
EXPORT_SYMBOL
(
pci_dev_driver
);
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