All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: class: fix block class problem when removing CONFIG_SYSFS_DEPRECATED*
@ 2023-03-07  7:51 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2023-03-07  7:51 UTC (permalink / raw
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Stephen Rothwell

In removing the CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2
config options, I messed up in the __class_register() function and got
the logic incorrect.  Fix this all up by just removing the special case
of a block device class logic in this function, as that is what is
intended.

In testing, this solves the boot problem on my systems, hopefully on
others as well.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 721da5cee9d4 ("driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/base/class.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/base/class.c b/drivers/base/class.c
index fb8f2a1e1c19..5983eead8391 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -178,13 +178,7 @@ int __class_register(struct class *cls, struct lock_class_key *key)
 	if (!cls->dev_kobj)
 		cls->dev_kobj = sysfs_dev_char_kobj;
 
-#if defined(CONFIG_BLOCK)
-	/* let the block class directory show up in the root of sysfs */
-	if (cls != &block_class)
-		cp->subsys.kobj.kset = class_kset;
-#else
 	cp->subsys.kobj.kset = class_kset;
-#endif
 	cp->subsys.kobj.ktype = &class_ktype;
 	cp->class = cls;
 	cls->p = cp;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-07  7:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07  7:51 [PATCH] driver core: class: fix block class problem when removing CONFIG_SYSFS_DEPRECATED* Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.