git: 9a62ff909505 - stable/13 - LinuxKPI: add devm_request_irq()

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Mon, 28 Nov 2022 17:27:05 UTC
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=9a62ff90950564e95688ff1bbd7b4c2b32b5acb0

commit 9a62ff90950564e95688ff1bbd7b4c2b32b5acb0
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2022-10-30 17:41:53 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2022-11-28 16:34:20 +0000

    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)
---
 sys/compat/linuxkpi/common/include/linux/interrupt.h | 8 ++++++++
 1 file changed, 8 insertions(+)

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
@@ -75,6 +75,14 @@ request_threaded_irq(int irq, irq_handler_t handler,
 	    flags, name, arg));
 }
 
+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,