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

Diff of /alsa/alsa-kernel/core/info.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 121  snd_info_entry_t *snd_seq_root = NULL; Line 121  snd_info_entry_t *snd_seq_root = NULL;
121  snd_info_entry_t *snd_oss_root = NULL;  snd_info_entry_t *snd_oss_root = NULL;
122  #endif  #endif
123    
 #ifndef LINUX_2_2  
124  static inline void snd_info_entry_prepare(struct proc_dir_entry *de)  static inline void snd_info_entry_prepare(struct proc_dir_entry *de)
125  {  {
126          de->owner = THIS_MODULE;          de->owner = THIS_MODULE;
# Line 133  void snd_remove_proc_entry(struct proc_d Line 132  void snd_remove_proc_entry(struct proc_d
132          if (de)          if (de)
133                  remove_proc_entry(de->name, parent);                  remove_proc_entry(de->name, parent);
134  }  }
 #endif  
135    
136  static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig)  static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig)
137  {  {
# Line 143  static loff_t snd_info_entry_llseek(stru Line 141  static loff_t snd_info_entry_llseek(stru
141    
142          data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO);          data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO);
143          entry = data->entry;          entry = data->entry;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 3)  
144          lock_kernel();          lock_kernel();
 #endif  
145          switch (entry->content) {          switch (entry->content) {
146          case SNDRV_INFO_CONTENT_TEXT:          case SNDRV_INFO_CONTENT_TEXT:
147                  switch (orig) {                  switch (orig) {
# Line 174  static loff_t snd_info_entry_llseek(stru Line 170  static loff_t snd_info_entry_llseek(stru
170          }          }
171          ret = -ENXIO;          ret = -ENXIO;
172  out:  out:
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 3)  
173          unlock_kernel();          unlock_kernel();
 #endif  
174          return ret;          return ret;
175  }  }
176    
# Line 495  static int snd_info_entry_mmap(struct fi Line 489  static int snd_info_entry_mmap(struct fi
489    
490  static struct file_operations snd_info_entry_operations =  static struct file_operations snd_info_entry_operations =
491  {  {
 #ifndef LINUX_2_2  
492          .owner =        THIS_MODULE,          .owner =        THIS_MODULE,
 #endif  
493          .llseek =       snd_info_entry_llseek,          .llseek =       snd_info_entry_llseek,
494          .read =         snd_info_entry_read,          .read =         snd_info_entry_read,
495          .write =        snd_info_entry_write,          .write =        snd_info_entry_write,
# Line 508  static struct file_operations snd_info_e Line 500  static struct file_operations snd_info_e
500          .release =      snd_info_entry_release,          .release =      snd_info_entry_release,
501  };  };
502    
 #ifdef LINUX_2_2  
 static struct inode_operations snd_info_entry_inode_operations =  
 {  
         &snd_info_entry_operations,     /* default sound info directory file-ops */  
 };  
 #endif  /* LINUX_2_2 */  
   
503  /**  /**
504   * snd_create_proc_entry - create a procfs entry   * snd_create_proc_entry - create a procfs entry
505   * @name: the name of the proc file   * @name: the name of the proc file
# Line 923  int snd_info_register(snd_info_entry_t * Line 908  int snd_info_register(snd_info_entry_t *
908                  up(&info_mutex);                  up(&info_mutex);
909                  return -ENOMEM;                  return -ENOMEM;
910          }          }
 #ifndef LINUX_2_2  
911          p->owner = entry->module;          p->owner = entry->module;
912  #endif          if (!S_ISDIR(entry->mode))
         if (!S_ISDIR(entry->mode)) {  
 #ifndef LINUX_2_2  
913                  p->proc_fops = &snd_info_entry_operations;                  p->proc_fops = &snd_info_entry_operations;
 #else  
                 p->ops = &snd_info_entry_inode_operations;  
 #endif  
         }  
914          p->size = entry->size;          p->size = entry->size;
915          p->data = entry;          p->data = entry;
916          entry->p = p;          entry->p = p;

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