diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-13 17:01:11 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-13 17:01:11 -0700 |
commit | 4c85980429f2769bd11c91c7cd90d297aef31fbd (patch) | |
tree | 2a73c4e6e09a6047128e56f48102c83671b42a39 /drivers/pci | |
parent | 597db6f38c4bcb90406d4e2f56446ba5a5dc20c6 (diff) | |
download | op-kernel-dev-4c85980429f2769bd11c91c7cd90d297aef31fbd.zip op-kernel-dev-4c85980429f2769bd11c91c7cd90d297aef31fbd.tar.gz |
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/pci')
-rw-r--r-- | drivers/pci/pci-label.c | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c index d51f45a..6f5d343 100644 --- a/drivers/pci/pci-label.c +++ b/drivers/pci/pci-label.c @@ -34,21 +34,7 @@ #define DEVICE_LABEL_DSM 0x07 -#ifndef CONFIG_DMI - -static inline int -pci_create_smbiosname_file(struct pci_dev *pdev) -{ - return -1; -} - -static inline void -pci_remove_smbiosname_file(struct pci_dev *pdev) -{ -} - -#else - +#ifdef CONFIG_DMI enum smbios_attr_enum { SMBIOS_ATTR_NONE = 0, SMBIOS_ATTR_LABEL_SHOW, @@ -156,31 +142,20 @@ pci_remove_smbiosname_file(struct pci_dev *pdev) { sysfs_remove_group(&pdev->dev.kobj, &smbios_attr_group); } - -#endif - -#ifndef CONFIG_ACPI - -static inline int -pci_create_acpi_index_label_files(struct pci_dev *pdev) -{ - return -1; -} - +#else static inline int -pci_remove_acpi_index_label_files(struct pci_dev *pdev) +pci_create_smbiosname_file(struct pci_dev *pdev) { return -1; } -static inline bool -device_has_dsm(struct device *dev) +static inline void +pci_remove_smbiosname_file(struct pci_dev *pdev) { - return false; } +#endif -#else - +#ifdef CONFIG_ACPI static const char device_label_dsm_uuid[] = { 0xD0, 0x37, 0xC9, 0xE5, 0x53, 0x35, 0x7A, 0x4D, 0x91, 0x17, 0xEA, 0x4D, 0x19, 0xC3, 0x43, 0x4D @@ -364,6 +339,24 @@ pci_remove_acpi_index_label_files(struct pci_dev *pdev) sysfs_remove_group(&pdev->dev.kobj, &acpi_attr_group); return 0; } +#else +static inline int +pci_create_acpi_index_label_files(struct pci_dev *pdev) +{ + return -1; +} + +static inline int +pci_remove_acpi_index_label_files(struct pci_dev *pdev) +{ + return -1; +} + +static inline bool +device_has_dsm(struct device *dev) +{ + return false; +} #endif void pci_create_firmware_label_files(struct pci_dev *pdev) |