aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-01-13 19:01:11 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-01-13 19:01:11 -0500
commit4c85980429f2769bd11c91c7cd90d297aef31fbd (patch)
tree2a73c4e6e09a6047128e56f48102c83671b42a39 /drivers
parent597db6f38c4bcb90406d4e2f56446ba5a5dc20c6 (diff)
PCI: Reorder so actual code comes before stubs
Consistently use the: #ifdef CONFIG_PCI_FOO int pci_foo(...); #else static inline int pci_foo(...) { return -1; } #endif pattern, instead of sometimes using "#ifndef CONFIG_PCI_FOO". No functional change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci-label.c57
1 files changed, 25 insertions, 32 deletions
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c
index d51f45aa669e..6f5d343d251c 100644
--- a/drivers/pci/pci-label.c
+++ b/drivers/pci/pci-label.c
@@ -34,21 +34,7 @@
34 34
35#define DEVICE_LABEL_DSM 0x07 35#define DEVICE_LABEL_DSM 0x07
36 36
37#ifndef CONFIG_DMI 37#ifdef CONFIG_DMI
38
39static inline int
40pci_create_smbiosname_file(struct pci_dev *pdev)
41{
42 return -1;
43}
44
45static inline void
46pci_remove_smbiosname_file(struct pci_dev *pdev)
47{
48}
49
50#else
51
52enum smbios_attr_enum { 38enum smbios_attr_enum {
53 SMBIOS_ATTR_NONE = 0, 39 SMBIOS_ATTR_NONE = 0,
54 SMBIOS_ATTR_LABEL_SHOW, 40 SMBIOS_ATTR_LABEL_SHOW,
@@ -156,31 +142,20 @@ pci_remove_smbiosname_file(struct pci_dev *pdev)
156{ 142{
157 sysfs_remove_group(&pdev->dev.kobj, &smbios_attr_group); 143 sysfs_remove_group(&pdev->dev.kobj, &smbios_attr_group);
158} 144}
159 145#else
160#endif
161
162#ifndef CONFIG_ACPI
163
164static inline int
165pci_create_acpi_index_label_files(struct pci_dev *pdev)
166{
167 return -1;
168}
169
170static inline int 146static inline int
171pci_remove_acpi_index_label_files(struct pci_dev *pdev) 147pci_create_smbiosname_file(struct pci_dev *pdev)
172{ 148{
173 return -1; 149 return -1;
174} 150}
175 151
176static inline bool 152static inline void
177device_has_dsm(struct device *dev) 153pci_remove_smbiosname_file(struct pci_dev *pdev)
178{ 154{
179 return false;
180} 155}
156#endif
181 157
182#else 158#ifdef CONFIG_ACPI
183
184static const char device_label_dsm_uuid[] = { 159static const char device_label_dsm_uuid[] = {
185 0xD0, 0x37, 0xC9, 0xE5, 0x53, 0x35, 0x7A, 0x4D, 160 0xD0, 0x37, 0xC9, 0xE5, 0x53, 0x35, 0x7A, 0x4D,
186 0x91, 0x17, 0xEA, 0x4D, 0x19, 0xC3, 0x43, 0x4D 161 0x91, 0x17, 0xEA, 0x4D, 0x19, 0xC3, 0x43, 0x4D
@@ -364,6 +339,24 @@ pci_remove_acpi_index_label_files(struct pci_dev *pdev)
364 sysfs_remove_group(&pdev->dev.kobj, &acpi_attr_group); 339 sysfs_remove_group(&pdev->dev.kobj, &acpi_attr_group);
365 return 0; 340 return 0;
366} 341}
342#else
343static inline int
344pci_create_acpi_index_label_files(struct pci_dev *pdev)
345{
346 return -1;
347}
348
349static inline int
350pci_remove_acpi_index_label_files(struct pci_dev *pdev)
351{
352 return -1;
353}
354
355static inline bool
356device_has_dsm(struct device *dev)
357{
358 return false;
359}
367#endif 360#endif
368 361
369void pci_create_firmware_label_files(struct pci_dev *pdev) 362void pci_create_firmware_label_files(struct pci_dev *pdev)