Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI/ASPM: Unexport internal ASPM interfaces

Several of the interfaces defined in include/linux/pci-aspm.h are used only
internally from the PCI core:

pcie_aspm_init_link_state()
pcie_aspm_exit_link_state()
pcie_aspm_pm_state_change()
pcie_aspm_powersave_config_link()
pcie_aspm_create_sysfs_dev_files()
pcie_aspm_remove_sysfs_dev_files()

Move these to the internal drivers/pci/pci.h header so they don't clutter
the driver interface.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

+22 -33
+20
drivers/pci/pci.h
··· 342 342 343 343 void pci_enable_acs(struct pci_dev *dev); 344 344 345 + #ifdef CONFIG_PCIEASPM 346 + void pcie_aspm_init_link_state(struct pci_dev *pdev); 347 + void pcie_aspm_exit_link_state(struct pci_dev *pdev); 348 + void pcie_aspm_pm_state_change(struct pci_dev *pdev); 349 + void pcie_aspm_powersave_config_link(struct pci_dev *pdev); 350 + #else 351 + static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) { } 352 + static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) { } 353 + static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) { } 354 + static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) { } 355 + #endif 356 + 357 + #ifdef CONFIG_PCIEASPM_DEBUG 358 + void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev); 359 + void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev); 360 + #else 361 + static inline void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) { } 362 + static inline void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev) { } 363 + #endif 364 + 345 365 #ifdef CONFIG_PCIE_PTM 346 366 void pci_ptm_init(struct pci_dev *dev); 347 367 #else
+2 -33
include/linux/pci-aspm.h
··· 24 24 #define PCIE_LINK_STATE_CLKPM 4 25 25 26 26 #ifdef CONFIG_PCIEASPM 27 - void pcie_aspm_init_link_state(struct pci_dev *pdev); 28 - void pcie_aspm_exit_link_state(struct pci_dev *pdev); 29 - void pcie_aspm_pm_state_change(struct pci_dev *pdev); 30 - void pcie_aspm_powersave_config_link(struct pci_dev *pdev); 31 27 void pci_disable_link_state(struct pci_dev *pdev, int state); 32 28 void pci_disable_link_state_locked(struct pci_dev *pdev, int state); 33 29 void pcie_no_aspm(void); 34 30 #else 35 - static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) 36 - { 37 - } 38 - static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) 39 - { 40 - } 41 - static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) 42 - { 43 - } 44 - static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) 45 - { 46 - } 47 - static inline void pci_disable_link_state(struct pci_dev *pdev, int state) 48 - { 49 - } 50 - static inline void pcie_no_aspm(void) 51 - { 52 - } 31 + static inline void pci_disable_link_state(struct pci_dev *pdev, int state) { } 32 + static inline void pcie_no_aspm(void) { } 53 33 #endif 54 34 55 - #ifdef CONFIG_PCIEASPM_DEBUG /* this depends on CONFIG_PCIEASPM */ 56 - void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev); 57 - void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev); 58 - #else 59 - static inline void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) 60 - { 61 - } 62 - static inline void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev) 63 - { 64 - } 65 - #endif 66 35 #endif /* LINUX_ASPM_H */