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
9888549e
Commit
9888549e
authored
May 05, 2005
by
Greg KH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] PCI: add modalias sysfs file for pci devices
Signed-off-by:
Greg Kroah-Hartman
<
gregkh@suse.de
>
parent
c22610da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
drivers/pci/pci-sysfs.c
drivers/pci/pci-sysfs.c
+12
-0
No files found.
drivers/pci/pci-sysfs.c
View file @
9888549e
...
@@ -73,6 +73,17 @@ resource_show(struct device * dev, char * buf)
...
@@ -73,6 +73,17 @@ resource_show(struct device * dev, char * buf)
return
(
str
-
buf
);
return
(
str
-
buf
);
}
}
static
ssize_t
modalias_show
(
struct
device
*
dev
,
char
*
buf
)
{
struct
pci_dev
*
pci_dev
=
to_pci_dev
(
dev
);
return
sprintf
(
buf
,
"pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x
\n
"
,
pci_dev
->
vendor
,
pci_dev
->
device
,
pci_dev
->
subsystem_vendor
,
pci_dev
->
subsystem_device
,
(
u8
)(
pci_dev
->
class
>>
16
),
(
u8
)(
pci_dev
->
class
>>
8
),
(
u8
)(
pci_dev
->
class
));
}
struct
device_attribute
pci_dev_attrs
[]
=
{
struct
device_attribute
pci_dev_attrs
[]
=
{
__ATTR_RO
(
resource
),
__ATTR_RO
(
resource
),
__ATTR_RO
(
vendor
),
__ATTR_RO
(
vendor
),
...
@@ -82,6 +93,7 @@ struct device_attribute pci_dev_attrs[] = {
...
@@ -82,6 +93,7 @@ struct device_attribute pci_dev_attrs[] = {
__ATTR_RO
(
class
),
__ATTR_RO
(
class
),
__ATTR_RO
(
irq
),
__ATTR_RO
(
irq
),
__ATTR_RO
(
local_cpus
),
__ATTR_RO
(
local_cpus
),
__ATTR_RO
(
modalias
),
__ATTR_NULL
,
__ATTR_NULL
,
};
};
...
...
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