aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg KH <gregkh@suse.de>2005-05-05 14:57:25 -0400
committerGreg KH <gregkh@suse.de>2005-05-17 17:31:12 -0400
commitd1ded203adf16b42ca90e9041120ae465ca5c4a6 (patch)
tree59c3218467807e1793fb4fc5d90141e072ab2212
parent9888549e0507cc95d1d7ade1595c00ff8e902659 (diff)
[PATCH] PCI: add MODALIAS to hotplug event for pci devices
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/pci/hotplug.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
index 6a1a976c4bff..3903f8c559b6 100644
--- a/drivers/pci/hotplug.c
+++ b/drivers/pci/hotplug.c
@@ -52,6 +52,16 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp,
52 if ((buffer_size - length <= 0) || (i >= num_envp)) 52 if ((buffer_size - length <= 0) || (i >= num_envp))
53 return -ENOMEM; 53 return -ENOMEM;
54 54
55 envp[i++] = scratch;
56 length += scnprintf (scratch, buffer_size - length,
57 "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n",
58 pdev->vendor, pdev->device,
59 pdev->subsystem_vendor, pdev->subsystem_device,
60 (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
61 (u8)(pdev->class));
62 if ((buffer_size - length <= 0) || (i >= num_envp))
63 return -ENOMEM;
64
55 envp[i] = NULL; 65 envp[i] = NULL;
56 66
57 return 0; 67 return 0;