Skip to content

Commit a870614

Browse files
committed
Merge branch 'pci/ifndefs' into next
* pci/ifndefs: PCI: Cleanup pci.h whitespace PCI: Reorder so actual code comes before stubs
2 parents 597db6f + 2ee546c commit a870614

File tree

2 files changed

+93
-230
lines changed

2 files changed

+93
-230
lines changed

drivers/pci/pci-label.c

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,7 @@
3434

3535
#define DEVICE_LABEL_DSM 0x07
3636

37-
#ifndef CONFIG_DMI
38-
39-
static inline int
40-
pci_create_smbiosname_file(struct pci_dev *pdev)
41-
{
42-
return -1;
43-
}
44-
45-
static inline void
46-
pci_remove_smbiosname_file(struct pci_dev *pdev)
47-
{
48-
}
49-
50-
#else
51-
37+
#ifdef CONFIG_DMI
5238
enum smbios_attr_enum {
5339
SMBIOS_ATTR_NONE = 0,
5440
SMBIOS_ATTR_LABEL_SHOW,
@@ -156,31 +142,20 @@ pci_remove_smbiosname_file(struct pci_dev *pdev)
156142
{
157143
sysfs_remove_group(&pdev->dev.kobj, &smbios_attr_group);
158144
}
159-
160-
#endif
161-
162-
#ifndef CONFIG_ACPI
163-
164-
static inline int
165-
pci_create_acpi_index_label_files(struct pci_dev *pdev)
166-
{
167-
return -1;
168-
}
169-
145+
#else
170146
static inline int
171-
pci_remove_acpi_index_label_files(struct pci_dev *pdev)
147+
pci_create_smbiosname_file(struct pci_dev *pdev)
172148
{
173149
return -1;
174150
}
175151

176-
static inline bool
177-
device_has_dsm(struct device *dev)
152+
static inline void
153+
pci_remove_smbiosname_file(struct pci_dev *pdev)
178154
{
179-
return false;
180155
}
156+
#endif
181157

182-
#else
183-
158+
#ifdef CONFIG_ACPI
184159
static const char device_label_dsm_uuid[] = {
185160
0xD0, 0x37, 0xC9, 0xE5, 0x53, 0x35, 0x7A, 0x4D,
186161
0x91, 0x17, 0xEA, 0x4D, 0x19, 0xC3, 0x43, 0x4D
@@ -364,6 +339,24 @@ pci_remove_acpi_index_label_files(struct pci_dev *pdev)
364339
sysfs_remove_group(&pdev->dev.kobj, &acpi_attr_group);
365340
return 0;
366341
}
342+
#else
343+
static inline int
344+
pci_create_acpi_index_label_files(struct pci_dev *pdev)
345+
{
346+
return -1;
347+
}
348+
349+
static inline int
350+
pci_remove_acpi_index_label_files(struct pci_dev *pdev)
351+
{
352+
return -1;
353+
}
354+
355+
static inline bool
356+
device_has_dsm(struct device *dev)
357+
{
358+
return false;
359+
}
367360
#endif
368361

369362
void pci_create_firmware_label_files(struct pci_dev *pdev)

0 commit comments

Comments
 (0)