git: 170c2e0e2bb1 - main - LinuxKPI: add devm_kfree()

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Mon, 15 Apr 2024 16:56:32 UTC
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=170c2e0e2bb1b2d9a7661ba729f8264381c9d9d7

commit 170c2e0e2bb1b2d9a7661ba729f8264381c9d9d7
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-04-02 09:45:43 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-04-15 16:55:59 +0000

    LinuxKPI: add devm_kfree()
    
    mt76 calls devm_kfree() directly, so alias it to our
    lkpi_devm_kmalloc_release() function.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D44589
---
 sys/compat/linuxkpi/common/include/linux/device.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
index 77c7a253a2e8..668fe9cb8650 100644
--- a/sys/compat/linuxkpi/common/include/linux/device.h
+++ b/sys/compat/linuxkpi/common/include/linux/device.h
@@ -283,6 +283,7 @@ int lkpi_devres_destroy(struct device *, void(*release)(struct device *, void *)
 void lkpi_devres_release_free_list(struct device *);
 void lkpi_devres_unlink(struct device *, void *);
 void lkpi_devm_kmalloc_release(struct device *, void *);
+#define	devm_kfree(_d, _p)		lkpi_devm_kmalloc_release(_d, _p)
 
 static inline const char *
 dev_driver_string(const struct device *dev)