diff mbox series

[2/2] driver core: class: warn if a compatibility class is registered

Message ID 7bc5fa50-59f6-4455-8f77-1c89f1e17d0b@gmail.com
State New
Headers show
Series i2c: core: prepare dropping support for I2C_COMPAT | expand

Commit Message

Heiner Kallweit Sept. 2, 2024, 7:02 p.m. UTC
Kernel doc for this function states:
"Compatibility class are meant as a temporary user-space compatibility
workaround when converting a family of class devices to a bus devices."

Therefore remind any potential user of the old ABI that support for it
will be dropped soon.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/base/class.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/base/class.c b/drivers/base/class.c
index 7b38fdf8e..f12a43736 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -556,6 +556,9 @@  struct class_compat *class_compat_register(const char *name)
 {
 	struct class_compat *cls;
 
+	pr_warn("Compatibility class %s will go away soon, please migrate userspace tools to use bus devices\n",
+		name);
+
 	cls = kmalloc(sizeof(struct class_compat), GFP_KERNEL);
 	if (!cls)
 		return NULL;