Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a0be2f7999aaff97962fe4240ab2ca12a394884c
Commit:     a0be2f7999aaff97962fe4240ab2ca12a394884c
Parent:     a9b69d0c0c928b4a78a0da32a903ae47b0ad09e7
Author:     Atsushi Nemoto <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 20 20:08:45 2007 +0900
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Feb 20 17:11:55 2007 +0000

    [MIPS] Drop __init from init_8259A()
    
    init_8259A() is called from i8259A_resume() so should not be marked as
    __init.  And add some tests for whether 8259A was already initialized
    or not.
    
    Signed-off-by: Atsushi Nemoto <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/kernel/i8259.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c
index b33ba6c..9c79703 100644
--- a/arch/mips/kernel/i8259.c
+++ b/arch/mips/kernel/i8259.c
@@ -28,7 +28,7 @@
  * moves to arch independent land
  */
 
-static int i8259A_auto_eoi;
+static int i8259A_auto_eoi = -1;
 DEFINE_SPINLOCK(i8259A_lock);
 /* some platforms call this... */
 void mask_and_ack_8259A(unsigned int);
@@ -216,7 +216,8 @@ spurious_8259A_irq:
 
 static int i8259A_resume(struct sys_device *dev)
 {
-       init_8259A(i8259A_auto_eoi);
+       if (i8259A_auto_eoi >= 0)
+               init_8259A(i8259A_auto_eoi);
        return 0;
 }
 
@@ -226,8 +227,10 @@ static int i8259A_shutdown(struct sys_device *dev)
         * the kernel initialization code can get it
         * out of.
         */
-       outb(0xff, PIC_MASTER_IMR);     /* mask all of 8259A-1 */
-       outb(0xff, PIC_SLAVE_IMR);      /* mask all of 8259A-1 */
+       if (i8259A_auto_eoi >= 0) {
+               outb(0xff, PIC_MASTER_IMR);     /* mask all of 8259A-1 */
+               outb(0xff, PIC_SLAVE_IMR);      /* mask all of 8259A-1 */
+       }
        return 0;
 }
 
@@ -252,7 +255,7 @@ static int __init i8259A_init_sysfs(void)
 
 device_initcall(i8259A_init_sysfs);
 
-void __init init_8259A(int auto_eoi)
+void init_8259A(int auto_eoi)
 {
        unsigned long flags;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to