Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

linux kernel 3.10 oss patch

By: a guest on Jul 1st, 2013  |  syntax: None  |  size: 1.60 KB  |  hits: 69  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --- usr/lib/oss/build/osscore.c 2012-05-22 00:23:41.000000000 +0200
  2. +++ usr/lib/oss/build/osscore.c 2013-07-01 17:07:37.620533508 +0200
  3. @@ -276,28 +276,55 @@ oss_read_devfiles (struct file *file, ch
  4.    return strlen (tmp);
  5.  }
  6.  
  7. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
  8.  static struct file_operations oss_proc_operations = {
  9.    .read = oss_read_devfiles,
  10.  };
  11. +#else
  12. +static struct file_operations fops = {
  13. + .owner = THIS_MODULE,
  14. + .read = oss_read_devfiles,
  15. +};
  16. +#endif
  17.  
  18.  static void
  19.  init_proc_fs (void)
  20.  {
  21. +  #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
  22.    if ((oss_proc_root =
  23.         create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL)
  24. +     {
  25. +         oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
  26. +         return;
  27. +     }
  28. +
  29. +  if ((oss_proc_devfiles =
  30. +        create_proc_entry ("devfiles", 0600, oss_proc_root)) == NULL)
  31. +     {
  32. +         oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
  33. +         return;
  34. +     }
  35. +
  36. +  oss_proc_devfiles->proc_fops = &oss_proc_operations;
  37. +
  38. +#else
  39. +
  40. +  if ((oss_proc_root =
  41. +         proc_mkdir ("opensound", NULL)) == NULL )
  42.      {
  43.        oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
  44.        return;
  45.      }
  46.  
  47.    if ((oss_proc_devfiles =
  48. -       create_proc_entry ("devfiles", 0600, oss_proc_root)) == NULL)
  49. +       proc_create ("devfiles", 0600, oss_proc_root, &fops)) == NULL)
  50.      {
  51.        oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
  52.        return;
  53.      }
  54. +    
  55. +#endif
  56.  
  57. -  oss_proc_devfiles->proc_fops = &oss_proc_operations;
  58.  }
  59.  
  60.  static void