Commit 044eb16b authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] further OSS audio updates

parent e88425b2
......@@ -513,8 +513,9 @@ static int ac97_mixer_ioctl(struct ac97_codec *codec, unsigned int cmd, unsigned
if (cmd == SOUND_MIXER_INFO) {
mixer_info info;
strncpy(info.id, codec->name, sizeof(info.id));
strncpy(info.name, codec->name, sizeof(info.name));
memset(&info, 0, sizeof(info));
strlcpy(info.id, codec->name, sizeof(info.id));
strlcpy(info.name, codec->name, sizeof(info.name));
info.modify_counter = codec->modcnt;
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
......@@ -522,8 +523,9 @@ static int ac97_mixer_ioctl(struct ac97_codec *codec, unsigned int cmd, unsigned
}
if (cmd == SOUND_OLD_MIXER_INFO) {
_old_mixer_info info;
strncpy(info.id, codec->name, sizeof(info.id));
strncpy(info.name, codec->name, sizeof(info.name));
memset(&info, 0, sizeof(info));
strlcpy(info.id, codec->name, sizeof(info.id));
strlcpy(info.name, codec->name, sizeof(info.name));
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
return 0;
......
......@@ -1272,8 +1272,9 @@ static int mixer_ioctl(struct cm_state *s, unsigned int cmd, unsigned long arg)
VALIDATE_STATE(s);
if (cmd == SOUND_MIXER_INFO) {
mixer_info info;
strncpy(info.id, "cmpci", sizeof(info.id));
strncpy(info.name, "C-Media PCI", sizeof(info.name));
memset(&info, 0, sizeof(info));
strlcpy(info.id, "cmpci", sizeof(info.id));
strlcpy(info.name, "C-Media PCI", sizeof(info.name));
info.modify_counter = s->mix.modcnt;
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
......@@ -1281,8 +1282,9 @@ static int mixer_ioctl(struct cm_state *s, unsigned int cmd, unsigned long arg)
}
if (cmd == SOUND_OLD_MIXER_INFO) {
_old_mixer_info info;
strncpy(info.id, "cmpci", sizeof(info.id));
strncpy(info.name, "C-Media cmpci", sizeof(info.name));
memset(&info, 0, sizeof(info));
strlcpy(info.id, "cmpci", sizeof(info.id));
strlcpy(info.name, "C-Media cmpci", sizeof(info.name));
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
return 0;
......
......@@ -351,8 +351,9 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd,
case SOUND_MIXER_INFO:
{
mixer_info info;
strncpy(info.id, dmasound.mach.name2, sizeof(info.id));
strncpy(info.name, dmasound.mach.name2, sizeof(info.name));
memset(&info, 0, sizeof(info));
strlcpy(info.id, dmasound.mach.name2, sizeof(info.id));
strlcpy(info.name, dmasound.mach.name2, sizeof(info.name));
info.modify_counter = mixer.modify_counter;
if (copy_to_user((int *)arg, &info, sizeof(info)))
return -EFAULT;
......
......@@ -787,9 +787,9 @@ static int hal2_mixer_ioctl(hal2_card_t *hal2, unsigned int cmd,
if (cmd == SOUND_MIXER_INFO) {
mixer_info info;
strncpy(info.id, hal2str, sizeof(info.id));
strncpy(info.name, hal2str, sizeof(info.name));
memset(&info, 0, sizeof(info));
strlcpy(info.id, hal2str, sizeof(info.id));
strlcpy(info.name, hal2str, sizeof(info.name));
info.modify_counter = hal2->mixer.modcnt;
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
......@@ -797,9 +797,9 @@ static int hal2_mixer_ioctl(hal2_card_t *hal2, unsigned int cmd,
}
if (cmd == SOUND_OLD_MIXER_INFO) {
_old_mixer_info info;
strncpy(info.id, hal2str, sizeof(info.id));
strncpy(info.name, hal2str, sizeof(info.name));
memset(&info, 0, sizeof(info));
strlcpy(info.id, hal2str, sizeof(info.id));
strlcpy(info.name, hal2str, sizeof(info.name));
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
return 0;
......
......@@ -1296,7 +1296,6 @@ static void __exit cleanup_harmony(void)
unregister_parisc_driver(&harmony_driver);
}
EXPORT_NO_SYMBOLS;
MODULE_AUTHOR("Alex DeVries <alex@linuxcare.com>");
MODULE_DESCRIPTION("Harmony sound driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment