vserver 1.9.5.x5
[linux-2.6.git] / arch / ppc / syslib / i8259.c
index c6c361b..b9391e6 100644 (file)
@@ -10,7 +10,7 @@ unsigned char cached_8259[2] = { 0xff, 0xff };
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static spinlock_t i8259_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(i8259_lock);
 
 int i8259_pic_irq_offset;
 
@@ -140,15 +140,31 @@ struct hw_interrupt_type i8259_pic = {
 };
 
 static struct resource pic1_iores = {
-       "8259 (master)", 0x20, 0x21, IORESOURCE_BUSY
+       .name = "8259 (master)",
+       .start = 0x20,
+       .end = 0x21,
+       .flags = IORESOURCE_BUSY,
 };
 
 static struct resource pic2_iores = {
-       "8259 (slave)", 0xa0, 0xa1, IORESOURCE_BUSY
+       .name = "8259 (slave)",
+       .start = 0xa0,
+       .end = 0xa1,
+       .flags = IORESOURCE_BUSY,
 };
 
 static struct resource pic_edgectrl_iores = {
-       "8259 edge control", 0x4d0, 0x4d1, IORESOURCE_BUSY
+       .name = "8259 edge control",
+       .start = 0x4d0,
+       .end = 0x4d1,
+       .flags = IORESOURCE_BUSY,
+};
+
+static struct irqaction i8259_irqaction = {
+       .handler = no_action,
+       .flags = SA_INTERRUPT,
+       .mask = CPU_MASK_NONE,
+       .name = "82c59 secondary cascade",
 };
 
 /*
@@ -185,8 +201,7 @@ i8259_init(long intack_addr)
        spin_unlock_irqrestore(&i8259_lock, flags);
 
        /* reserve our resources */
-       request_irq( i8259_pic_irq_offset + 2, no_action, SA_INTERRUPT,
-                               "82c59 secondary cascade", NULL );
+       setup_irq( i8259_pic_irq_offset + 2, &i8259_irqaction);
        request_resource(&ioport_resource, &pic1_iores);
        request_resource(&ioport_resource, &pic2_iores);
        request_resource(&ioport_resource, &pic_edgectrl_iores);