749 |
timer->tmr_device = tid->device; |
timer->tmr_device = tid->device; |
750 |
timer->tmr_subdevice = tid->subdevice; |
timer->tmr_subdevice = tid->subdevice; |
751 |
if (id) |
if (id) |
752 |
strncpy(timer->id, id, sizeof(timer->id) - 1); |
strlcpy(timer->id, id, sizeof(timer->id)); |
753 |
INIT_LIST_HEAD(&timer->device_list); |
INIT_LIST_HEAD(&timer->device_list); |
754 |
INIT_LIST_HEAD(&timer->open_list_head); |
INIT_LIST_HEAD(&timer->open_list_head); |
755 |
INIT_LIST_HEAD(&timer->active_list_head); |
INIT_LIST_HEAD(&timer->active_list_head); |
1317 |
ginfo.card = t->card ? t->card->number : -1; |
ginfo.card = t->card ? t->card->number : -1; |
1318 |
if (t->hw.flags & SNDRV_TIMER_HW_SLAVE) |
if (t->hw.flags & SNDRV_TIMER_HW_SLAVE) |
1319 |
ginfo.flags |= SNDRV_TIMER_FLG_SLAVE; |
ginfo.flags |= SNDRV_TIMER_FLG_SLAVE; |
1320 |
strncpy(ginfo.id, t->id, sizeof(ginfo.id)-1); |
strlcpy(ginfo.id, t->id, sizeof(ginfo.id)); |
1321 |
strncpy(ginfo.name, t->name, sizeof(ginfo.name)-1); |
strlcpy(ginfo.name, t->name, sizeof(ginfo.name)); |
1322 |
ginfo.resolution = t->hw.resolution; |
ginfo.resolution = t->hw.resolution; |
1323 |
if (t->hw.resolution_min > 0) { |
if (t->hw.resolution_min > 0) { |
1324 |
ginfo.resolution_min = t->hw.resolution_min; |
ginfo.resolution_min = t->hw.resolution_min; |
1457 |
info.card = t->card ? t->card->number : -1; |
info.card = t->card ? t->card->number : -1; |
1458 |
if (t->hw.flags & SNDRV_TIMER_HW_SLAVE) |
if (t->hw.flags & SNDRV_TIMER_HW_SLAVE) |
1459 |
info.flags |= SNDRV_TIMER_FLG_SLAVE; |
info.flags |= SNDRV_TIMER_FLG_SLAVE; |
1460 |
strncpy(info.id, t->id, sizeof(info.id)-1); |
strlcpy(info.id, t->id, sizeof(info.id)); |
1461 |
strncpy(info.name, t->name, sizeof(info.name)-1); |
strlcpy(info.name, t->name, sizeof(info.name)); |
1462 |
info.resolution = t->hw.resolution; |
info.resolution = t->hw.resolution; |
1463 |
if (copy_to_user(_info, &info, sizeof(*_info))) |
if (copy_to_user(_info, &info, sizeof(*_info))) |
1464 |
return -EFAULT; |
return -EFAULT; |
1733 |
|
|
1734 |
static struct file_operations snd_timer_f_ops = |
static struct file_operations snd_timer_f_ops = |
1735 |
{ |
{ |
|
#ifndef LINUX_2_2 |
|
1736 |
.owner = THIS_MODULE, |
.owner = THIS_MODULE, |
|
#endif |
|
1737 |
.read = snd_timer_user_read, |
.read = snd_timer_user_read, |
1738 |
.open = snd_timer_user_open, |
.open = snd_timer_user_open, |
1739 |
.release = snd_timer_user_release, |
.release = snd_timer_user_release, |