The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=8bdb76f2024545934ca7aff8cbd87bd6f2ffe38f
commit 8bdb76f2024545934ca7aff8cbd87bd6f2ffe38f Author: Jean-Sébastien Pédron <dumbb...@freebsd.org> AuthorDate: 2025-01-01 14:39:25 +0000 Commit: Jean-Sébastien Pédron <dumbb...@freebsd.org> CommitDate: 2025-01-31 16:00:49 +0000 linuxkpi: Add `dev_is_removable()` [Why] This is used by the amdgpy DRM driver starting from Linux 6.7. [How] The function always returns false, like `pci_is_thunderbolt_attached()` because we don't have an API for this in FreeBSD yet. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48758 --- sys/compat/linuxkpi/common/include/linux/device.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index f56a39e904c8..a5f6874a07f6 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -330,6 +330,13 @@ dev_name(const struct device *dev) return kobject_name(&dev->kobj); } +static inline bool +dev_is_removable(struct device *dev) +{ + + return (false); +} + #define dev_set_name(_dev, _fmt, ...) \ kobject_set_name(&(_dev)->kobj, (_fmt), ##__VA_ARGS__)