mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] parport: use subsys_initcall
@ 2016-04-12 15:26 Sudip Mukherjee
  2016-04-30 16:24 ` Sudip Mukherjee
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2016-04-12 15:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Linus Torvalds, Sudip Mukherjee

The drivers which depends on parport may sometimes try to iniitialize
and register with parport bus even before parport has actually
registered with the device layer.
The simplest solution is to mark the init function as subsys_initcall()
and load the parport before the other drivers loads.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---

Linus suggested to only mark parport_bus_init() as subsys_initcall()
but since we are supporting both the device model code and the old code
so to load parport properly we should have parport_default_proc_register()
as subsys_initcall(). After we have removed all the old code then we can
have parport_bus_init().

This has been tested in the same build environment and using same config
which 0-day report was containing for the bug report of ppdev. And also
tested using latest char-misc/testing.

 drivers/parport/procfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index c776333..74ed3e4 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -617,5 +617,5 @@ static void __exit parport_default_proc_unregister (void)
 }
 #endif
 
-module_init(parport_default_proc_register)
+subsys_initcall(parport_default_proc_register)
 module_exit(parport_default_proc_unregister)
-- 
1.9.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-30 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 15:26 [PATCH] parport: use subsys_initcall Sudip Mukherjee
2016-04-30 16:24 ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®