diff options
author | 2021-12-06 23:27:28 +0100 | |
---|---|---|
committer | 2021-12-09 11:52:20 +0100 | |
commit | 1197528aaea79ed4909aba695d18fdecc5387a36 (patch) | |
tree | ec14287b62e4eda7cf518821f879c5011d4e5f6e /include/linux/msi.h | |
parent | PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity() (diff) | |
download | linux-1197528aaea79ed4909aba695d18fdecc5387a36.tar.gz linux-1197528aaea79ed4909aba695d18fdecc5387a36.tar.bz2 linux-1197528aaea79ed4909aba695d18fdecc5387a36.zip |
genirq/msi: Guard sysfs code
No point in building unused code when CONFIG_SYSFS=n.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211206210223.985907940@linutronix.de
Diffstat (limited to 'include/linux/msi.h')
-rw-r--r-- | include/linux/msi.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index e616f94c7c58..d43b9469c88b 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -239,9 +239,19 @@ void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); void pci_msi_mask_irq(struct irq_data *data); void pci_msi_unmask_irq(struct irq_data *data); +#ifdef CONFIG_SYSFS const struct attribute_group **msi_populate_sysfs(struct device *dev); void msi_destroy_sysfs(struct device *dev, const struct attribute_group **msi_irq_groups); +#else +static inline const struct attribute_group **msi_populate_sysfs(struct device *dev) +{ + return NULL; +} +static inline void msi_destroy_sysfs(struct device *dev, const struct attribute_group **msi_irq_groups) +{ +} +#endif /* * The arch hooks to setup up msi irqs. Default functions are implemented |