Lines Matching refs:timer
68 struct mISDNtimer *timer, *next; in mISDN_close() local
75 timer = list_first_entry(list, struct mISDNtimer, list); in mISDN_close()
77 timer_shutdown_sync(&timer->tl); in mISDN_close()
80 list_del(&timer->list); in mISDN_close()
81 kfree(timer); in mISDN_close()
85 list_for_each_entry_safe(timer, next, &dev->expired, list) { in mISDN_close()
86 kfree(timer); in mISDN_close()
97 struct mISDNtimer *timer; in mISDN_read() local
121 timer = list_first_entry(list, struct mISDNtimer, list); in mISDN_read()
122 list_del(&timer->list); in mISDN_read()
124 if (put_user(timer->id, (int __user *)buf)) in mISDN_read()
128 kfree(timer); in mISDN_read()
158 struct mISDNtimer *timer = from_timer(timer, t, tl); in dev_expire_timer() local
161 spin_lock_irqsave(&timer->dev->lock, flags); in dev_expire_timer()
162 if (timer->id >= 0) in dev_expire_timer()
163 list_move_tail(&timer->list, &timer->dev->expired); in dev_expire_timer()
164 wake_up_interruptible(&timer->dev->wait); in dev_expire_timer()
165 spin_unlock_irqrestore(&timer->dev->lock, flags); in dev_expire_timer()
172 struct mISDNtimer *timer; in misdn_add_timer() local
179 timer = kzalloc(sizeof(struct mISDNtimer), GFP_KERNEL); in misdn_add_timer()
180 if (!timer) in misdn_add_timer()
182 timer->dev = dev; in misdn_add_timer()
183 timer_setup(&timer->tl, dev_expire_timer, 0); in misdn_add_timer()
185 id = timer->id = dev->next_id++; in misdn_add_timer()
188 list_add_tail(&timer->list, &dev->pending); in misdn_add_timer()
189 timer->tl.expires = jiffies + ((HZ * (u_long)timeout) / 1000); in misdn_add_timer()
190 add_timer(&timer->tl); in misdn_add_timer()
199 struct mISDNtimer *timer; in misdn_del_timer() local
202 list_for_each_entry(timer, &dev->pending, list) { in misdn_del_timer()
203 if (timer->id == id) { in misdn_del_timer()
204 list_del_init(&timer->list); in misdn_del_timer()
205 timer->id = -1; in misdn_del_timer()
207 timer_shutdown_sync(&timer->tl); in misdn_del_timer()
208 kfree(timer); in misdn_del_timer()