aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2022-10-30 17:41:53 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2022-11-28 16:34:20 +0000
commit9a62ff90950564e95688ff1bbd7b4c2b32b5acb0 (patch)
tree4cb48a06ca3700c1d2d939806785a74da8c30a53
parentdb047ca73f0f057e913744d65ac723d9fc91b3f6 (diff)
downloadsrc-9a62ff90950564e95688ff1bbd7b4c2b32b5acb0.tar.gz
src-9a62ff90950564e95688ff1bbd7b4c2b32b5acb0.zip
LinuxKPI: add devm_request_irq()
Add devm_request_irq() needed by a driver. Turns out all we need is a wrapper with the right arguments to lkpi_request_irq(). Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D37217 (cherry picked from commit 6e8d6761312e92227a87e0e07b51f89ff81a24b3)
-rw-r--r--sys/compat/linuxkpi/common/include/linux/interrupt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h
index 8cfb37e700ce..57d7ac58ec5e 100644
--- a/sys/compat/linuxkpi/common/include/linux/interrupt.h
+++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h
@@ -76,6 +76,14 @@ request_threaded_irq(int irq, irq_handler_t handler,
}
static inline int
+devm_request_irq(struct device *dev, int irq,
+ irq_handler_t handler, unsigned long flags, const char *name, void *arg)
+{
+
+ return (lkpi_request_irq(dev, irq, handler, NULL, flags, name, arg));
+}
+
+static inline int
devm_request_threaded_irq(struct device *dev, int irq,
irq_handler_t handler, irq_handler_t thread_handler,
unsigned long flags, const char *name, void *arg)