From: Jesse Barnes <jbar...@virtuousgeek.org>

This allows callers to store the ops structure in a parent device structure.

Signed-off-by: Jesse Barnes <jbar...@virtuousgeek.org>
Signed-off-by: Jason Wessel <jason.wes...@windriver.com>
---
 drivers/serial/kgdboc.c |    4 ++--
 include/linux/kgdb.h    |    6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c
index 34b0306..93b18f9 100644
--- a/drivers/serial/kgdboc.c
+++ b/drivers/serial/kgdboc.c
@@ -208,7 +208,7 @@ static void kgdboc_pre_exp_handler(void)
 {
        if (kgdboc_use_kms && dbg_kms_console_core &&
            dbg_kms_console_core->activate_console)
-               if (dbg_kms_console_core->activate_console())
+               if 
(dbg_kms_console_core->activate_console(dbg_kms_console_core))
                        printk(KERN_ERR "kgdboc: kernel mode switch error\n");
 
        /* Increment the module count when the debugger is active */
@@ -223,7 +223,7 @@ static void kgdboc_post_exp_handler(void)
                module_put(THIS_MODULE);
        if (kgdboc_use_kms && dbg_kms_console_core &&
            dbg_kms_console_core->restore_console)
-               if (dbg_kms_console_core->restore_console())
+               if (dbg_kms_console_core->restore_console(dbg_kms_console_core))
                        printk(KERN_ERR "kgdboc: graphics restore failed\n");
 #ifdef CONFIG_KDB_KEYBOARD
        /* If using the kdb keyboard driver release all the keys. */
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 5ce1158..5ba827b 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -309,10 +309,12 @@ extern atomic_t                   kgdb_active;
 extern void kgdb_schedule_breakpoint(void);
 
 struct dbg_kms_console_ops {
-       int (*activate_console) (void);
-       int (*restore_console) (void);
+       int (*activate_console) (struct dbg_kms_console_ops *ops);
+       int (*restore_console) (struct dbg_kms_console_ops *ops);
 };
 extern struct dbg_kms_console_ops *dbg_kms_console_core;
+extern int dbg_kms_console_ops_register(struct dbg_kms_console_ops *ops);
+extern int dbg_kms_console_ops_unregister(struct dbg_kms_console_ops *ops);
 
 #ifdef CONFIG_KGDB_SERIAL_CONSOLE
 extern void __init early_kgdboc_init(void);
-- 
1.6.4.rc1


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to