Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 2025 16:03:23 GMT
From:      =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 8bdb76f20245 - main - linuxkpi: Add `dev_is_removable()`
Message-ID:  <202501311603.50VG3Nvq038896@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <dumbbell@FreeBSD.org>
AuthorDate: 2025-01-01 14:39:25 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@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__)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501311603.50VG3Nvq038896>