vserver 1.9.3
[linux-2.6.git] / drivers / pci / hotplug / shpchp_hpc.c
index 60331cc..752d725 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/vmalloc.h>
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
+#include <linux/delay.h>
 #include <linux/pci.h>
 #include <asm/system.h>
 #include "shpchp.h"
 static spinlock_t hpc_event_lock;
 
 DEFINE_DBG_BUFFER              /* Debug string buffer for entire HPC defined here */
-static struct php_ctlr_state_s *php_ctlr_list_head = 0;        /* HPC state linked list */
+static struct php_ctlr_state_s *php_ctlr_list_head;    /* HPC state linked list */
 static int ctlr_seq_num = 0;   /* Controller sequenc # */
 static spinlock_t list_lock;
 
@@ -300,8 +301,7 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd)
                if (!(cmd_status & 0x1))
                        break;
                /*  Check every 0.1 sec for a total of 1 sec*/
-               set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(HZ/10);
+               msleep(100);
        }
 
        cmd_status = readw(php_ctlr->creg + CMD_STATUS);
@@ -799,7 +799,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
                iounmap(php_ctlr->creg);
                release_mem_region(pci_resource_start(php_ctlr->pci_dev, 0), pci_resource_len(php_ctlr->pci_dev, 0));
                dbg("%s: before calling iounmap & release_mem_region\n", __FUNCTION__);
-               php_ctlr->pci_dev = 0;
+               php_ctlr->pci_dev = NULL;
        }
 
        spin_lock(&list_lock);
@@ -1572,7 +1572,7 @@ int shpc_init(struct controller * ctrl,
        if (php_ctlr_list_head == 0) {
                php_ctlr_list_head = php_ctlr;
                p = php_ctlr_list_head;
-               p->pnext = 0;
+               p->pnext = NULL;
        } else {
                p = php_ctlr_list_head;