All of lore.kernel.org
 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 related	[flat|nested] 2+ messages in thread

* Re: [PATCH] parport: use subsys_initcall
  2016-04-12 15:26 [PATCH] parport: use subsys_initcall Sudip Mukherjee
@ 2016-04-30 16:24 ` Sudip Mukherjee
  0 siblings, 0 replies; 2+ messages in thread
From: Sudip Mukherjee @ 2016-04-30 16:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Linus Torvalds

On Tue, Apr 12, 2016 at 08:56:10PM +0530, Sudip Mukherjee wrote:
> 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>
> ---

Hi Greg,
A gentle ping.
I know you are going to close your trees soon. And maybe we don't have
enough time to have this tested on linux-next.

regards
sudip

^ 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 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.