All of lore.kernel.org
 help / color / mirror / Atom feed
* intel_scu_ipc: Fix to overcome late initialization of scu  ipc driver
@ 2010-05-30 17:40 Ds, Sreedhara
  2010-05-30 17:43 ` Matthew Garrett
  0 siblings, 1 reply; 2+ messages in thread
From: Ds, Sreedhara @ 2010-05-30 17:40 UTC (permalink / raw)
  To: platform-driver-x86, x86, Cox, Alan, Matthew Garrett

[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]

  It is observed that scu ipc driver initializing late, after moving from arch/x86/kernel to drivers/platform/x86.
Other drivers which are using ipc like GPIO are initialized before ipc driver. This is temporary fix to avoid this.

Resending the previous patch

From f8d29b90e6015387451062a6a5ae1499de120ab4 Mon Sep 17 00:00:00 2001
From: Sreedhara DS <sreedhara.ds@intel.com>
Date: Fri, 28 May 2010 14:04:02 +0530
Subject: [PATCH] changes to avoid late initialization of driver
 ipc driver needs to be initialized before any other driver using ipc
 	modified:   intel_scu_ipc.c


Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com>
---
 drivers/platform/x86/intel_scu_ipc.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
index ffd304a..8bb3fda 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -834,14 +834,8 @@ static int __init intel_scu_ipc_init(void)
 	return  pci_register_driver(&ipc_driver);
 }
 
-static void __exit intel_scu_ipc_exit(void)
-{
-	pci_unregister_driver(&ipc_driver);
-}
-
 MODULE_AUTHOR("Sreedhara DS <sreedhara.ds@intel.com>");
 MODULE_DESCRIPTION("Intel SCU IPC driver");
 MODULE_LICENSE("GPL");
 
-module_init(intel_scu_ipc_init);
-module_exit(intel_scu_ipc_exit);
+fs_initcall(intel_scu_ipc_init);
-- 
1.5.4.5


[-- Attachment #2: 0003-changes-to-avoid-late-initialization-of-driver.patch --]
[-- Type: application/octet-stream, Size: 1133 bytes --]

From f8d29b90e6015387451062a6a5ae1499de120ab4 Mon Sep 17 00:00:00 2001
From: Sreedhara DS <sreedhara.ds@intel.com>
Date: Fri, 28 May 2010 14:04:02 +0530
Subject: [PATCH] changes to avoid late initialization of driver
 ipc driver needs to be initialized before any other driver using ipc
 	modified:   intel_scu_ipc.c


Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com>
---
 drivers/platform/x86/intel_scu_ipc.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
index ffd304a..8bb3fda 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -834,14 +834,8 @@ static int __init intel_scu_ipc_init(void)
 	return  pci_register_driver(&ipc_driver);
 }
 
-static void __exit intel_scu_ipc_exit(void)
-{
-	pci_unregister_driver(&ipc_driver);
-}
-
 MODULE_AUTHOR("Sreedhara DS <sreedhara.ds@intel.com>");
 MODULE_DESCRIPTION("Intel SCU IPC driver");
 MODULE_LICENSE("GPL");
 
-module_init(intel_scu_ipc_init);
-module_exit(intel_scu_ipc_exit);
+fs_initcall(intel_scu_ipc_init);
-- 
1.5.4.5


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

* Re: intel_scu_ipc: Fix to overcome late initialization of scu  ipc driver
  2010-05-30 17:40 intel_scu_ipc: Fix to overcome late initialization of scu ipc driver Ds, Sreedhara
@ 2010-05-30 17:43 ` Matthew Garrett
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Garrett @ 2010-05-30 17:43 UTC (permalink / raw)
  To: Ds, Sreedhara; +Cc: platform-driver-x86, x86, Cox, Alan

On Sun, May 30, 2010 at 11:10:03PM +0530, Ds, Sreedhara wrote:
> -static void __exit intel_scu_ipc_exit(void)
> -{
> -	pci_unregister_driver(&ipc_driver);
> -}
> -
>  MODULE_AUTHOR("Sreedhara DS <sreedhara.ds@intel.com>");
>  MODULE_DESCRIPTION("Intel SCU IPC driver");
>  MODULE_LICENSE("GPL");
>  
> -module_init(intel_scu_ipc_init);
> -module_exit(intel_scu_ipc_exit);
> +fs_initcall(intel_scu_ipc_init);

This is wrong. If it can't be a module then delete all the other module 
code from the driver and change it to a bool in Kconfig. And don't use 
fs_initcall - subsys or arch would seem more reasonable, but you're not 
describing the problem terribly clearly. Which drivers are getting 
initialised before this?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

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

end of thread, other threads:[~2010-05-30 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-30 17:40 intel_scu_ipc: Fix to overcome late initialization of scu ipc driver Ds, Sreedhara
2010-05-30 17:43 ` Matthew Garrett

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.