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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/base/class.c | 3 +++
 1 file changed, 3 insertions(+)

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;
-- 
2.46.0






[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux