struct list_head *p;
list_for_each(p, &snd_timer_list) {
- timer = (snd_timer_t *)list_entry(p, snd_timer_t, device_list);
+ timer = list_entry(p, snd_timer_t, device_list);
if (timer->tmr_class != tid->dev_class)
continue;
/* FIXME: it's really dumb to look up all entries.. */
list_for_each(p, &snd_timer_list) {
- timer = (snd_timer_t *)list_entry(p, snd_timer_t, device_list);
+ timer = list_entry(p, snd_timer_t, device_list);
list_for_each(q, &timer->open_list_head) {
- master = (snd_timer_instance_t *)list_entry(q, snd_timer_instance_t, open_list);
+ master = list_entry(q, snd_timer_instance_t, open_list);
if (slave->slave_class == master->slave_class &&
slave->slave_id == master->slave_id) {
list_del(&slave->open_list);
/* check all pending slaves */
list_for_each_safe(p, n, &snd_timer_slave_list) {
- slave = (snd_timer_instance_t *)list_entry(p, snd_timer_instance_t, open_list);
+ slave = list_entry(p, snd_timer_instance_t, open_list);
if (slave->slave_class == master->slave_class &&
slave->slave_id == master->slave_id) {
list_del(p);
timer->hw.close(timer);
/* remove slave links */
list_for_each_safe(p, n, &timeri->slave_list_head) {
- slave = (snd_timer_instance_t *)list_entry(p, snd_timer_instance_t, open_list);
+ slave = list_entry(p, snd_timer_instance_t, open_list);
spin_lock_irq(&slave_active_lock);
_snd_timer_stop(slave, 1, SNDRV_TIMER_EVENT_RESOLUTION);
list_del(p);
return;
spin_lock_irqsave(&timer->lock, flags);
list_for_each(n, &ti->slave_active_head) {
- ts = (snd_timer_instance_t *)list_entry(n, snd_timer_instance_t, active_list);
+ ts = list_entry(n, snd_timer_instance_t, active_list);
if (ts->ccallback)
ts->ccallback(ti, event + 100, &tstamp, resolution);
}
struct list_head *p;
list_for_each(p, &timer->active_list_head) {
- ti = (snd_timer_instance_t *)list_entry(p, snd_timer_instance_t, active_list);
+ ti = list_entry(p, snd_timer_instance_t, active_list);
if (ti->flags & SNDRV_TIMER_IFLG_START) {
ti->flags &= ~SNDRV_TIMER_IFLG_START;
ti->flags |= SNDRV_TIMER_IFLG_RUNNING;
/* now process all callbacks */
while (!list_empty(&timer->sack_list_head)) {
p = timer->sack_list_head.next; /* get first item */
- ti = (snd_timer_instance_t *)list_entry(p, snd_timer_instance_t, ack_list);
+ ti = list_entry(p, snd_timer_instance_t, ack_list);
/* remove from ack_list and make empty */
list_del_init(p);
* instance is relinked to done_list_head before callback is called.
*/
list_for_each_safe(p, n, &timer->active_list_head) {
- ti = (snd_timer_instance_t *)list_entry(p, snd_timer_instance_t, active_list);
+ ti = list_entry(p, snd_timer_instance_t, active_list);
if (!(ti->flags & SNDRV_TIMER_IFLG_RUNNING))
continue;
ti->pticks += ticks_left;
}
}
list_for_each(q, &ti->slave_active_head) {
- ts = (snd_timer_instance_t *)list_entry(q, snd_timer_instance_t, active_list);
+ ts = list_entry(q, snd_timer_instance_t, active_list);
ts->pticks = ti->pticks;
ts->resolution = resolution;
if (list_empty(&ts->ack_list)) {
/* now process all fast callbacks */
while (!list_empty(&timer->ack_list_head)) {
p = timer->ack_list_head.next; /* get first item */
- ti = (snd_timer_instance_t *)list_entry(p, snd_timer_instance_t, ack_list);
+ ti = list_entry(p, snd_timer_instance_t, ack_list);
/* remove from ack_list and make empty */
list_del_init(p);
down(®ister_mutex);
list_for_each(p, &snd_timer_list) {
- timer1 = (snd_timer_t *)list_entry(p, snd_timer_t, device_list);
+ timer1 = list_entry(p, snd_timer_t, device_list);
if (timer1->tmr_class > timer->tmr_class)
break;
if (timer1->tmr_class < timer->tmr_class)
snd_printk(KERN_WARNING "timer 0x%lx is busy?\n", (long)timer);
list_for_each_safe(p, n, &timer->open_list_head) {
list_del_init(p);
- ti = (snd_timer_instance_t *)list_entry(p, snd_timer_instance_t, open_list);
+ ti = list_entry(p, snd_timer_instance_t, open_list);
ti->timer = NULL;
}
}
resolution = timer->hw.resolution;
}
list_for_each(p, &timer->active_list_head) {
- ti = (snd_timer_instance_t *)list_entry(p, snd_timer_instance_t, active_list);
+ ti = list_entry(p, snd_timer_instance_t, active_list);
if (ti->ccallback)
ti->ccallback(ti, event, tstamp, resolution);
list_for_each(n, &ti->slave_active_head) {
- ts = (snd_timer_instance_t *)list_entry(n, snd_timer_instance_t, active_list);
+ ts = list_entry(n, snd_timer_instance_t, active_list);
if (ts->ccallback)
ts->ccallback(ts, event, tstamp, resolution);
}
down(®ister_mutex);
list_for_each(p, &snd_timer_list) {
- timer = (snd_timer_t *)list_entry(p, snd_timer_t, device_list);
+ timer = list_entry(p, snd_timer_t, device_list);
switch (timer->tmr_class) {
case SNDRV_TIMER_CLASS_GLOBAL:
snd_iprintf(buffer, "G%i: ", timer->tmr_device);
snd_iprintf(buffer, "\n");
spin_lock_irqsave(&timer->lock, flags);
list_for_each(q, &timer->open_list_head) {
- ti = (snd_timer_instance_t *)list_entry(q, snd_timer_instance_t, open_list);
+ ti = list_entry(q, snd_timer_instance_t, open_list);
snd_iprintf(buffer, " Client %s : %s : lost interrupts %li\n",
ti->owner ? ti->owner : "unknown",
ti->flags & (SNDRV_TIMER_IFLG_START|SNDRV_TIMER_IFLG_RUNNING) ? "running" : "stopped",
if (list_empty(&snd_timer_list))
snd_timer_user_zero_id(&id);
else {
- timer = (snd_timer_t *)list_entry(snd_timer_list.next, snd_timer_t, device_list);
+ timer = list_entry(snd_timer_list.next,
+ snd_timer_t, device_list);
snd_timer_user_copy_id(&id, timer);
}
} else {
case SNDRV_TIMER_CLASS_GLOBAL:
id.device = id.device < 0 ? 0 : id.device + 1;
list_for_each(p, &snd_timer_list) {
- timer = (snd_timer_t *)list_entry(p, snd_timer_t, device_list);
+ timer = list_entry(p, snd_timer_t, device_list);
if (timer->tmr_class > SNDRV_TIMER_CLASS_GLOBAL) {
snd_timer_user_copy_id(&id, timer);
break;
}
}
list_for_each(p, &snd_timer_list) {
- timer = (snd_timer_t *)list_entry(p, snd_timer_t, device_list);
+ timer = list_entry(p, snd_timer_t, device_list);
if (timer->tmr_class > id.dev_class) {
snd_timer_user_copy_id(&id, timer);
break;
snd_unregister_device(SNDRV_DEVICE_TYPE_TIMER, NULL, 0);
/* unregister the system timer */
list_for_each_safe(p, n, &snd_timer_list) {
- snd_timer_t *timer = (snd_timer_t *)list_entry(p, snd_timer_t, device_list);
+ snd_timer_t *timer = list_entry(p, snd_timer_t, device_list);
snd_timer_unregister(timer);
}
if (snd_timer_proc_entry) {