[PATCH] fix character subsystem initialisation panic

From: James Bottomley (James.Bottomley@steeleye.com)
Date: Sun Jun 08 2003 - 12:35:25 EST

In 2.5.70 bk latest, I'm getting a panic related to character device
initialisation. The problem seems to be that the new sysfs entries for
character devices require that everything now have a properly
initialised parent. However, the character subsystem is set up in
drivers/char/mem.c as


However, __initcall() is the same priority as module_init(), so whether
character devices are initialised before their required subsystem
depends purely on link ordering (on parisc, we initialise devices/parisc
before everything else, so it is panicing reliably with this).

I think the fix is to convert the __initcall to subsys_initcall (patch
attached). The patch allows parisc to boot properly now.


===== drivers/char/mem.c 1.39 vs edited =====
--- 1.39/drivers/char/mem.c Fri Jun 6 01:36:40 2003
+++ edited/drivers/char/mem.c Sun Jun 8 12:02:24 2003
@@ -713,4 +713,4 @@
         return 0;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:19 EST