aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug.c')
-rw-r--r--drivers/pci/hotplug.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
index e1743be31909..1c97e7dd130b 100644
--- a/drivers/pci/hotplug.c
+++ b/drivers/pci/hotplug.c
@@ -3,8 +3,8 @@
3#include <linux/module.h> 3#include <linux/module.h>
4#include "pci.h" 4#include "pci.h"
5 5
6int pci_hotplug (struct device *dev, char **envp, int num_envp, 6int pci_uevent(struct device *dev, char **envp, int num_envp,
7 char *buffer, int buffer_size) 7 char *buffer, int buffer_size)
8{ 8{
9 struct pci_dev *pdev; 9 struct pci_dev *pdev;
10 int i = 0; 10 int i = 0;
@@ -17,34 +17,34 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp,
17 if (!pdev) 17 if (!pdev)
18 return -ENODEV; 18 return -ENODEV;
19 19
20 if (add_hotplug_env_var(envp, num_envp, &i, 20 if (add_uevent_var(envp, num_envp, &i,
21 buffer, buffer_size, &length, 21 buffer, buffer_size, &length,
22 "PCI_CLASS=%04X", pdev->class)) 22 "PCI_CLASS=%04X", pdev->class))
23 return -ENOMEM; 23 return -ENOMEM;
24 24
25 if (add_hotplug_env_var(envp, num_envp, &i, 25 if (add_uevent_var(envp, num_envp, &i,
26 buffer, buffer_size, &length, 26 buffer, buffer_size, &length,
27 "PCI_ID=%04X:%04X", pdev->vendor, pdev->device)) 27 "PCI_ID=%04X:%04X", pdev->vendor, pdev->device))
28 return -ENOMEM; 28 return -ENOMEM;
29 29
30 if (add_hotplug_env_var(envp, num_envp, &i, 30 if (add_uevent_var(envp, num_envp, &i,
31 buffer, buffer_size, &length, 31 buffer, buffer_size, &length,
32 "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, 32 "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor,
33 pdev->subsystem_device)) 33 pdev->subsystem_device))
34 return -ENOMEM; 34 return -ENOMEM;
35 35
36 if (add_hotplug_env_var(envp, num_envp, &i, 36 if (add_uevent_var(envp, num_envp, &i,
37 buffer, buffer_size, &length, 37 buffer, buffer_size, &length,
38 "PCI_SLOT_NAME=%s", pci_name(pdev))) 38 "PCI_SLOT_NAME=%s", pci_name(pdev)))
39 return -ENOMEM; 39 return -ENOMEM;
40 40
41 if (add_hotplug_env_var(envp, num_envp, &i, 41 if (add_uevent_var(envp, num_envp, &i,
42 buffer, buffer_size, &length, 42 buffer, buffer_size, &length,
43 "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x", 43 "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x",
44 pdev->vendor, pdev->device, 44 pdev->vendor, pdev->device,
45 pdev->subsystem_vendor, pdev->subsystem_device, 45 pdev->subsystem_vendor, pdev->subsystem_device,
46 (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), 46 (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
47 (u8)(pdev->class))) 47 (u8)(pdev->class)))
48 return -ENOMEM; 48 return -ENOMEM;
49 49
50 envp[i] = NULL; 50 envp[i] = NULL;