#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;
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);
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);
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;