/[openvortex]/alsa/alsa-kernel/core/control.c
ViewVC logotype

Diff of /alsa/alsa-kernel/core/control.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by vizard, Sat May 31 02:35:09 2003 UTC revision 1.3 by vizard, Sun Jun 15 21:01:30 2003 UTC
# Line 222  snd_kcontrol_t *snd_ctl_new1(snd_kcontro Line 222  snd_kcontrol_t *snd_ctl_new1(snd_kcontro
222          kctl.id.device = ncontrol->device;          kctl.id.device = ncontrol->device;
223          kctl.id.subdevice = ncontrol->subdevice;          kctl.id.subdevice = ncontrol->subdevice;
224          if (ncontrol->name)          if (ncontrol->name)
225                  strncpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)-1);                  strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name));
226          kctl.id.index = ncontrol->index;          kctl.id.index = ncontrol->index;
227          kctl.count = ncontrol->count ? ncontrol->count : 1;          kctl.count = ncontrol->count ? ncontrol->count : 1;
228          access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :          access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
# Line 445  static int snd_ctl_card_info(snd_card_t Line 445  static int snd_ctl_card_info(snd_card_t
445          memset(&info, 0, sizeof(info));          memset(&info, 0, sizeof(info));
446          down_read(&snd_ioctl_rwsem);          down_read(&snd_ioctl_rwsem);
447          info.card = card->number;          info.card = card->number;
448          strncpy(info.id, card->id, sizeof(info.id) - 1);          strlcpy(info.id, card->id, sizeof(info.id));
449          strncpy(info.driver, card->driver, sizeof(info.driver) - 1);          strlcpy(info.driver, card->driver, sizeof(info.driver));
450          strncpy(info.name, card->shortname, sizeof(info.name) - 1);          strlcpy(info.name, card->shortname, sizeof(info.name));
451          strncpy(info.longname, card->longname, sizeof(info.longname) - 1);          strlcpy(info.longname, card->longname, sizeof(info.longname));
452          strncpy(info.mixername, card->mixername, sizeof(info.mixername) - 1);          strlcpy(info.mixername, card->mixername, sizeof(info.mixername));
453          strncpy(info.components, card->components, sizeof(info.components) - 1);          strlcpy(info.components, card->components, sizeof(info.components));
454          up_read(&snd_ioctl_rwsem);          up_read(&snd_ioctl_rwsem);
455          if (copy_to_user((void *) arg, &info, sizeof(snd_ctl_card_info_t)))          if (copy_to_user((void *) arg, &info, sizeof(snd_ctl_card_info_t)))
456                  return -EFAULT;                  return -EFAULT;
# Line 927  static int snd_ctl_fasync(int fd, struct Line 927  static int snd_ctl_fasync(int fd, struct
927    
928  static struct file_operations snd_ctl_f_ops =  static struct file_operations snd_ctl_f_ops =
929  {  {
 #ifndef LINUX_2_2  
930          .owner =        THIS_MODULE,          .owner =        THIS_MODULE,
 #endif  
931          .read =         snd_ctl_read,          .read =         snd_ctl_read,
932          .open =         snd_ctl_open,          .open =         snd_ctl_open,
933          .release =      snd_ctl_release,          .release =      snd_ctl_release,

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26