diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 44cbbbaa499d..48849ffdd672 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -43,43 +43,6 @@ int no_pci_devices(void) | |||
43 | EXPORT_SYMBOL(no_pci_devices); | 43 | EXPORT_SYMBOL(no_pci_devices); |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * PCI Bus Class Devices | ||
47 | */ | ||
48 | static ssize_t pci_bus_show_cpuaffinity(struct device *dev, | ||
49 | int type, | ||
50 | struct device_attribute *attr, | ||
51 | char *buf) | ||
52 | { | ||
53 | int ret; | ||
54 | const struct cpumask *cpumask; | ||
55 | |||
56 | cpumask = cpumask_of_pcibus(to_pci_bus(dev)); | ||
57 | ret = type? | ||
58 | cpulist_scnprintf(buf, PAGE_SIZE-2, cpumask) : | ||
59 | cpumask_scnprintf(buf, PAGE_SIZE-2, cpumask); | ||
60 | buf[ret++] = '\n'; | ||
61 | buf[ret] = '\0'; | ||
62 | return ret; | ||
63 | } | ||
64 | |||
65 | static ssize_t inline pci_bus_show_cpumaskaffinity(struct device *dev, | ||
66 | struct device_attribute *attr, | ||
67 | char *buf) | ||
68 | { | ||
69 | return pci_bus_show_cpuaffinity(dev, 0, attr, buf); | ||
70 | } | ||
71 | |||
72 | static ssize_t inline pci_bus_show_cpulistaffinity(struct device *dev, | ||
73 | struct device_attribute *attr, | ||
74 | char *buf) | ||
75 | { | ||
76 | return pci_bus_show_cpuaffinity(dev, 1, attr, buf); | ||
77 | } | ||
78 | |||
79 | DEVICE_ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpumaskaffinity, NULL); | ||
80 | DEVICE_ATTR(cpulistaffinity, S_IRUGO, pci_bus_show_cpulistaffinity, NULL); | ||
81 | |||
82 | /* | ||
83 | * PCI Bus Class | 46 | * PCI Bus Class |
84 | */ | 47 | */ |
85 | static void release_pcibus_dev(struct device *dev) | 48 | static void release_pcibus_dev(struct device *dev) |
@@ -95,6 +58,7 @@ static void release_pcibus_dev(struct device *dev) | |||
95 | static struct class pcibus_class = { | 58 | static struct class pcibus_class = { |
96 | .name = "pci_bus", | 59 | .name = "pci_bus", |
97 | .dev_release = &release_pcibus_dev, | 60 | .dev_release = &release_pcibus_dev, |
61 | .dev_attrs = pcibus_dev_attrs, | ||
98 | }; | 62 | }; |
99 | 63 | ||
100 | static int __init pcibus_class_init(void) | 64 | static int __init pcibus_class_init(void) |
@@ -1455,9 +1419,6 @@ struct pci_bus * pci_create_bus(struct device *parent, | |||
1455 | error = device_register(&b->dev); | 1419 | error = device_register(&b->dev); |
1456 | if (error) | 1420 | if (error) |
1457 | goto class_dev_reg_err; | 1421 | goto class_dev_reg_err; |
1458 | error = device_create_file(&b->dev, &dev_attr_cpuaffinity); | ||
1459 | if (error) | ||
1460 | goto dev_create_file_err; | ||
1461 | 1422 | ||
1462 | /* Create legacy_io and legacy_mem files for this bus */ | 1423 | /* Create legacy_io and legacy_mem files for this bus */ |
1463 | pci_create_legacy_files(b); | 1424 | pci_create_legacy_files(b); |
@@ -1468,8 +1429,6 @@ struct pci_bus * pci_create_bus(struct device *parent, | |||
1468 | 1429 | ||
1469 | return b; | 1430 | return b; |
1470 | 1431 | ||
1471 | dev_create_file_err: | ||
1472 | device_unregister(&b->dev); | ||
1473 | class_dev_reg_err: | 1432 | class_dev_reg_err: |
1474 | device_unregister(dev); | 1433 | device_unregister(dev); |
1475 | dev_reg_err: | 1434 | dev_reg_err: |