Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
d1ded203
Commit
d1ded203
authored
May 05, 2005
by
Greg KH
Browse files
[PATCH] PCI: add MODALIAS to hotplug event for pci devices
Signed-off-by:
Greg Kroah-Hartman
<
gregkh@suse.de
>
parent
9888549e
Changes
1
Hide whitespace changes
Inline
Side-by-side
drivers/pci/hotplug.c
View file @
d1ded203
...
...
@@ -52,6 +52,16 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp,
if
((
buffer_size
-
length
<=
0
)
||
(
i
>=
num_envp
))
return
-
ENOMEM
;
envp
[
i
++
]
=
scratch
;
length
+=
scnprintf
(
scratch
,
buffer_size
-
length
,
"MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x
\n
"
,
pdev
->
vendor
,
pdev
->
device
,
pdev
->
subsystem_vendor
,
pdev
->
subsystem_device
,
(
u8
)(
pdev
->
class
>>
16
),
(
u8
)(
pdev
->
class
>>
8
),
(
u8
)(
pdev
->
class
));
if
((
buffer_size
-
length
<=
0
)
||
(
i
>=
num_envp
))
return
-
ENOMEM
;
envp
[
i
]
=
NULL
;
return
0
;
...
...
Vikram Narayanan
@vikram
Mentioned in commit
145b3fe5
·
Oct 31, 2016
Mentioned in commit
145b3fe5
Mentioned in commit 145b3fe579db66fbe999a2bc3fd5b63dffe9636d
Toggle commit list
Write
Preview
Supports
Markdown
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