 tp->ht_opaque = NULL; 
int hpet_register(struct hpet_task *tp, int periodic){	unsigned int i;	u64 mask;	struct hpet_timer __iomem *timer;	struct hpet_dev *devp;	struct hpets *hpetp;	switch (periodic) {	case 1:		mask = Tn_PER_INT_CAP_MASK;		break;	case 0:		mask = 0;		break;	default:		return -EINVAL;	}	spin_lock_irq(&hpet_task_lock);	spin_lock(&hpet_lock);	for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)		for (timer = hpetp->hp_hpet->hpet_timers, i = 0;		     i < hpetp->hp_ntimer; i++, timer++) {			if ((readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK)			    != mask)				continue;			devp = &hpetp->hp_dev[i];			if (devp->hd_flags & HPET_OPEN || devp->hd_task) {				devp = NULL;				continue;			}			tp->ht_opaque = devp;			devp->hd_task = tp;			break;		}	spin_unlock(&hpet_lock);	spin_unlock_irq(&hpet_task_lock);	if (tp->ht_opaque)		return 0;	else		return -EBUSY;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/7522e4ecdfdf86b9816f06d55766a6f88baa0348/hpet.c/clean/drivers/char/hpet.c