[PATCH 3/3][-mm] reclassify pcmcia_socket_class mutex

Dave Young hidave.darkstar at gmail.com
Tue May 20 06:01:42 EDT 2008


[Please first apply patch 1/3 before this]

To please lockdep here we use class_reclassify to change
the lock class of sg_sysfs_class

Signed-off-by: Dave Young <hidave.darkstar at gmail.com>

---
 drivers/pcmcia/cs.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- linux/drivers/pcmcia/cs.c	2008-05-19 14:48:16.000000000 +0800
+++ linux.new/drivers/pcmcia/cs.c	2008-05-19 14:51:04.000000000 +0800
@@ -944,8 +944,13 @@ EXPORT_SYMBOL(pcmcia_socket_class);
 
 static int __init init_pcmcia_cs(void)
 {
+	int ret;
 	init_completion(&pcmcia_unload);
-	return class_register(&pcmcia_socket_class);
+	ret = class_register(&pcmcia_socket_class);
+	if (!ret)
+		class_reclassify(&pcmcia_socket_class);
+
+	return ret;
 }
 
 static void __exit exit_pcmcia_cs(void)



More information about the linux-pcmcia mailing list