169 |
|
|
170 |
memset(&info, 0, sizeof(info)); |
memset(&info, 0, sizeof(info)); |
171 |
info.card = hw->card->number; |
info.card = hw->card->number; |
172 |
strncpy(info.id, hw->id, sizeof(info.id) - 1); |
strlcpy(info.id, hw->id, sizeof(info.id)); |
173 |
strncpy(info.name, hw->name, sizeof(info.name) - 1); |
strlcpy(info.name, hw->name, sizeof(info.name)); |
174 |
info.iface = hw->iface; |
info.iface = hw->iface; |
175 |
if (copy_to_user(_info, &info, sizeof(info))) |
if (copy_to_user(_info, &info, sizeof(info))) |
176 |
return -EFAULT; |
return -EFAULT; |
292 |
|
|
293 |
static struct file_operations snd_hwdep_f_ops = |
static struct file_operations snd_hwdep_f_ops = |
294 |
{ |
{ |
|
#ifndef LINUX_2_2 |
|
295 |
.owner = THIS_MODULE, |
.owner = THIS_MODULE, |
|
#endif |
|
296 |
.llseek = snd_hwdep_llseek, |
.llseek = snd_hwdep_llseek, |
297 |
.read = snd_hwdep_read, |
.read = snd_hwdep_read, |
298 |
.write = snd_hwdep_write, |
.write = snd_hwdep_write, |
341 |
hwdep->card = card; |
hwdep->card = card; |
342 |
hwdep->device = device; |
hwdep->device = device; |
343 |
if (id) { |
if (id) { |
344 |
strncpy(hwdep->id, id, sizeof(hwdep->id) - 1); |
strlcpy(hwdep->id, id, sizeof(hwdep->id)); |
345 |
} |
} |
346 |
#ifdef CONFIG_SND_OSSEMUL |
#ifdef CONFIG_SND_OSSEMUL |
347 |
hwdep->oss_type = -1; |
hwdep->oss_type = -1; |