This interface: void pci_ats_init(struct pci_dev *dev); is only used in drivers/pci/ and does not need to be seen by the rest of the kernel. Move it to drivers/pci/pci.h so it's private to the PCI subsystem.
Unified · Split
| @@ -439,11 +439,12 @@ static inline void pci_restore_dpc_state(struct pci_dev *dev) {} · 438 unmodified lines | |||
| 439 | #endif | 439 | #endif |
| 440 | 440 | ||
| 441 | #ifdef CONFIG_PCI_ATS | 441 | #ifdef CONFIG_PCI_ATS |
| 442 | /* Address Translation Service */ | ||
| 443 | void pci_ats_init(struct pci_dev *dev); | ||
| 442 | void pci_restore_ats_state(struct pci_dev *dev); | 444 | void pci_restore_ats_state(struct pci_dev *dev); |
| 443 | #else | 445 | #else |
| 444 | static inline void pci_restore_ats_state(struct pci_dev *dev) | 446 | static inline void pci_ats_init(struct pci_dev *d) { } |
| 445 | { | 447 | static inline void pci_restore_ats_state(struct pci_dev *dev) { } |
| 446 | } | ||
| 447 | #endif /* CONFIG_PCI_ATS */ | 448 | #endif /* CONFIG_PCI_ATS */ |
| 448 | 449 | ||
| 449 | #ifdef CONFIG_PCI_IOV | 450 | #ifdef CONFIG_PCI_IOV |
| @@ -1761,13 +1761,11 @@ static inline bool pci_ats_disabled(void) { return true; } · 1760 unmodified lines | |||
| 1761 | 1761 | ||
| 1762 | #ifdef CONFIG_PCI_ATS | 1762 | #ifdef CONFIG_PCI_ATS |
| 1763 | /* Address Translation Service */ | 1763 | /* Address Translation Service */ |
| 1764 | void pci_ats_init(struct pci_dev *dev); | ||
| 1765 | int pci_enable_ats(struct pci_dev *dev, int ps); | 1764 | int pci_enable_ats(struct pci_dev *dev, int ps); |
| 1766 | void pci_disable_ats(struct pci_dev *dev); | 1765 | void pci_disable_ats(struct pci_dev *dev); |
| 1767 | int pci_ats_queue_depth(struct pci_dev *dev); | 1766 | int pci_ats_queue_depth(struct pci_dev *dev); |
| 1768 | int pci_ats_page_aligned(struct pci_dev *dev); | 1767 | int pci_ats_page_aligned(struct pci_dev *dev); |
| 1769 | #else | 1768 | #else |
| 1770 | static inline void pci_ats_init(struct pci_dev *d) { } | ||
| 1771 | static inline int pci_enable_ats(struct pci_dev *d, int ps) { return -ENODEV; } | 1769 | static inline int pci_enable_ats(struct pci_dev *d, int ps) { return -ENODEV; } |
| 1772 | static inline void pci_disable_ats(struct pci_dev *d) { } | 1770 | static inline void pci_disable_ats(struct pci_dev *d) { } |
| 1773 | static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } | 1771 | static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } |