summaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-12-06 23:27:28 +0100
committerThomas Gleixner <tglx@linutronix.de>2021-12-09 11:52:20 +0100
commit1197528aaea79ed4909aba695d18fdecc5387a36 (patch)
treeec14287b62e4eda7cf518821f879c5011d4e5f6e /kernel/irq
parent29bbc35e29d9b6347780dcacde2deb4b39344167 (diff)
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 'kernel/irq')
-rw-r--r--kernel/irq/msi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 7f350ae59c5f..a8a0daeb22f5 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -72,6 +72,7 @@ void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg)
}
EXPORT_SYMBOL_GPL(get_cached_msi_msg);
+#ifdef CONFIG_SYSFS
static ssize_t msi_mode_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
@@ -204,6 +205,7 @@ void msi_destroy_sysfs(struct device *dev, const struct attribute_group **msi_ir
kfree(msi_irq_groups);
}
}
+#endif
#ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
static inline void irq_chip_write_msi_msg(struct irq_data *data,