Advertisement
theroot

linux-3.10 nvidia-drivers-325.08 patch

Jul 23rd, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 17.53 KB | None | 0 0
  1. --- NVIDIA-Linux-x86_64-325.08.orig/kernel/nv-i2c.c 2013-04-26 00:22:30.000000000 -0400
  2. +++ NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c  2013-05-13 05:20:55.571981365 -0400
  3. @@ -311,8 +311,6 @@
  4.  BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
  5.  {
  6.      struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
  7. -    int osstatus = 0;
  8. -    BOOL wasReleased = FALSE;
  9.  
  10.  #if defined(KERNEL_2_4)
  11.      if (!NV_WEAK_SYMBOL_PRESENT(i2c_add_adapter))
  12. @@ -324,15 +322,10 @@
  13.      if (!pI2cAdapter) return FALSE;
  14.  
  15.      // attempt release with the OS
  16. -    osstatus = i2c_del_adapter(pI2cAdapter);
  17. +    i2c_del_adapter(pI2cAdapter);
  18. +    os_free_mem(pI2cAdapter);
  19.  
  20. -    if (!osstatus)
  21. -    {
  22. -        os_free_mem(pI2cAdapter);
  23. -        wasReleased = TRUE;
  24. -    }
  25. -
  26. -    return wasReleased;
  27. +    return TRUE;
  28.  }
  29.  
  30.  #else // (defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE))
  31.  
  32. --- NVIDIA-Linux-x86_64-325.08.orig/kernel/nv-procfs.c  2013-04-26 00:22:30.000000000 -0400
  33. +++ NVIDIA-Linux-x86_64-325.08/kernel/nv-procfs.c   2013-05-22 04:52:45.229495748 -0400
  34. @@ -60,60 +60,41 @@
  35.          __entry;                                          \
  36.      })
  37.  
  38. -#define NV_CREATE_PROC_FILE(name,parent,__read_proc,           \
  39. -    __write_proc,__fops,__data)                                \
  40. -   ({                                                          \
  41. -        struct proc_dir_entry *__entry;                        \
  42. -        int __mode = (S_IFREG | S_IRUGO);                      \
  43. -        if ((NvUPtr)(__write_proc) != 0)                       \
  44. -            __mode |= S_IWUSR;                                 \
  45. -        __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent);  \
  46. -        if (__entry != NULL)                                   \
  47. -        {                                                      \
  48. -            if ((NvUPtr)(__read_proc) != 0)                    \
  49. -                __entry->read_proc = (__read_proc);            \
  50. -            if ((NvUPtr)(__write_proc) != 0)                   \
  51. -            {                                                  \
  52. -                __entry->write_proc = (__write_proc);          \
  53. -                __entry->proc_fops = (__fops);                 \
  54. -            }                                                  \
  55. -            __entry->data = (__data);                          \
  56. -        }                                                      \
  57. -        __entry;                                               \
  58. -    })
  59. +#define NV_PROC_RW (S_IFREG|S_IRUGO|S_IWUSR)
  60. +#define NV_PROC_RO (S_IFREG|S_IRUGO)
  61.  
  62.  #define NV_CREATE_PROC_DIR(name,parent)                        \
  63.     ({                                                          \
  64.          struct proc_dir_entry *__entry;                        \
  65.          int __mode = (S_IFDIR | S_IRUGO | S_IXUGO);            \
  66. -        __entry = NV_CREATE_PROC_ENTRY(name, __mode, parent);  \
  67. +        __entry = proc_mkdir_mode(name, __mode, parent);       \
  68.          __entry;                                               \
  69.      })
  70.  
  71. +#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,9,255)
  72. +static inline void *PDE_DATA(const struct inode *inode) {
  73. +   return PDE(inode)->data;
  74. +}
  75. +#endif
  76. +
  77.  #define NV_PROC_WRITE_BUFFER_SIZE   (64 * RM_PAGE_SIZE)
  78.  
  79.  static int
  80. -nv_procfs_read_gpu_info(
  81. -    char  *page,
  82. -    char **start,
  83. -    off_t  off,
  84. -    int    count,
  85. -    int   *eof,
  86. -    void  *data
  87. +nv_procfs_show_gpu_info(
  88. +    struct seq_file *m,
  89. +    void *v
  90.  )
  91.  {
  92. -    nv_state_t *nv = data;
  93. +    nv_state_t *nv = m->private;
  94.      nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
  95.      struct pci_dev *dev = nvl->dev;
  96.      char *type, *fmt, tmpstr[NV_DEVICE_NAME_LENGTH];
  97. -    int len = 0, status;
  98. +    int status;
  99.      NvU8 *uuid;
  100.      NvU32 vbios_rev1, vbios_rev2, vbios_rev3, vbios_rev4, vbios_rev5;
  101.      NvU32 fpga_rev1, fpga_rev2, fpga_rev3;
  102.      nv_stack_t *sp = NULL;
  103.  
  104. -    *eof = 1;
  105. -
  106.      NV_KMEM_CACHE_ALLOC_STACK(sp);
  107.      if (sp == NULL)
  108.      {
  109. @@ -134,31 +115,31 @@
  110.          if (rm_get_device_name(sp, nv, dev->device, dev->subsystem_vendor,
  111.                      dev->subsystem_device, NV_DEVICE_NAME_LENGTH,
  112.                      tmpstr) != RM_OK)
  113. -        {
  114. +              {
  115.              strcpy (tmpstr, "Unknown");
  116.          }
  117.      }
  118.  
  119. -    len += sprintf(page+len, "Model: \t\t %s\n", tmpstr);
  120. -    len += sprintf(page+len, "IRQ:   \t\t %d\n", nv->interrupt_line);
  121. +    seq_printf(m, "Model: \t\t %s\n", tmpstr);
  122. +    seq_printf(m, "IRQ:   \t\t %d\n", nv->interrupt_line);
  123.  
  124.      if (NV_IS_GVI_DEVICE(nv))
  125.      {
  126.          status = rm_gvi_get_firmware_version(sp, nv, &fpga_rev1, &fpga_rev2,
  127.                                               &fpga_rev3);
  128.          if (status != RM_OK)
  129. -            len += sprintf(page+len, "Firmware: \t ????.??.??\n");
  130. +            seq_printf(m, "Firmware: \t ????.??.??\n");
  131.          else
  132.          {
  133.              fmt = "Firmware: \t %x.%x.%x\n";
  134. -            len += sprintf(page+len, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
  135. +            seq_printf(m, fmt, fpga_rev1, fpga_rev2, fpga_rev3);
  136.          }
  137.      }
  138.      else
  139.      {
  140.          if (rm_get_gpu_uuid(sp, nv, &uuid, NULL) == RM_OK)
  141.          {
  142. -            len += sprintf(page+len, "GPU UUID: \t %s\n", (char *)uuid);
  143. +            seq_printf(m, "GPU UUID: \t %s\n", (char *)uuid);
  144.              os_free_mem(uuid);
  145.          }
  146.  
  147. @@ -166,12 +147,12 @@
  148.                      &vbios_rev3, &vbios_rev4,
  149.                      &vbios_rev5) != RM_OK)
  150.          {
  151. -            len += sprintf(page+len, "Video BIOS: \t ??.??.??.??.??\n");
  152. +            seq_printf(m, "Video BIOS: \t ??.??.??.??.??\n");
  153.          }
  154.          else
  155.          {
  156.              fmt = "Video BIOS: \t %02x.%02x.%02x.%02x.%02x\n";
  157. -            len += sprintf(page+len, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
  158. +            seq_printf(m, fmt, vbios_rev1, vbios_rev2, vbios_rev3,
  159.                             vbios_rev4, vbios_rev5);
  160.          }
  161.      }
  162. @@ -180,12 +161,12 @@
  163.          type = "PCI-E";
  164.      else
  165.          type = "PCI";
  166. -    len += sprintf(page+len, "Bus Type: \t %s\n", type);
  167. +    seq_printf(m, "Bus Type: \t %s\n", type);
  168.  
  169. -    len += sprintf(page+len, "DMA Size: \t %d bits\n",
  170. +    seq_printf(m, "DMA Size: \t %d bits\n",
  171.       nv_count_bits(dev->dma_mask));
  172. -    len += sprintf(page+len, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
  173. -    len += sprintf(page+len, "Bus Location: \t %04x:%02x.%02x.%x\n",
  174. +    seq_printf(m, "DMA Mask: \t 0x%llx\n", dev->dma_mask);
  175. +    seq_printf(m, "Bus Location: \t %04x:%02x.%02x.%x\n",
  176.                     nv->domain, nv->bus, nv->slot, PCI_FUNC(dev->devfn));
  177.  #if defined(DEBUG)
  178.      do
  179. @@ -193,7 +174,7 @@
  180.          int j;
  181.          for (j = 0; j < NV_GPU_NUM_BARS; j++)
  182.          {
  183. -            len += sprintf(page+len, "BAR%u: \t\t 0x%llx (%lluMB)\n",
  184. +            seq_printf(m, "BAR%u: \t\t 0x%llx (%lluMB)\n",
  185.                             j, nv->bars[j].address, (nv->bars[j].size >> 20));
  186.          }
  187.      } while (0);
  188. @@ -201,26 +182,120 @@
  189.  
  190.      NV_KMEM_CACHE_FREE_STACK(sp);
  191.  
  192. -    return len;
  193. +    return 0;
  194.  }
  195.  
  196.  static int
  197. -nv_procfs_read_version(
  198. -    char  *page,
  199. -    char **start,
  200. -    off_t  off,
  201. -    int    count,
  202. -    int   *eof,
  203. -    void  *data
  204. +nv_procfs_open_gpu_info(
  205. +    struct inode *inode,
  206. +    struct file *file
  207. +)
  208. +{
  209. +    return single_open(file, nv_procfs_show_gpu_info, PDE_DATA(inode));
  210. +}
  211. +
  212. +static const struct file_operations nv_procfs_gpu_info_fops = {
  213. +    .owner   = THIS_MODULE,
  214. +    .open    = nv_procfs_open_gpu_info,
  215. +    .read    = seq_read,
  216. +    .llseek  = seq_lseek,
  217. +    .release = single_release,
  218. +};
  219. +
  220. +static int
  221. +nv_procfs_show_version(
  222. +    struct seq_file *m,
  223. +    void *v
  224. +)
  225. +{
  226. +    seq_printf(m, "NVRM version: %s\n", pNVRM_ID);
  227. +    seq_printf(m, "GCC version:  %s\n", NV_COMPILER);
  228. +
  229. +    return 0;
  230. +}
  231. +
  232. +static int
  233. +nv_procfs_open_version(
  234. +    struct inode *inode,
  235. +    struct file *file
  236. +)
  237. +{
  238. +    return single_open(file, nv_procfs_show_version, NULL);
  239. +}
  240. +
  241. +static const struct file_operations nv_procfs_version_fops = {
  242. +    .owner   = THIS_MODULE,
  243. +    .open    = nv_procfs_open_version,
  244. +    .read    = seq_read,
  245. +    .llseek  = seq_lseek,
  246. +    .release = single_release,
  247. +};
  248. +
  249. +static int
  250. +nv_procfs_show_registry(
  251. +    struct seq_file *m,
  252. +    void *v
  253. +)
  254. +{
  255. +    nv_state_t *nv = m->private;
  256. +    nv_linux_state_t *nvl = NULL;
  257. +    char *registry_keys;
  258. +
  259. +    if (nv != NULL)
  260. +        nvl = NV_GET_NVL_FROM_NV_STATE(nv);
  261. +    registry_keys = ((nvl != NULL) ?
  262. +            nvl->registry_keys : nv_registry_keys);
  263. +
  264. +    seq_printf(m, "Binary: \"%s\"\n", registry_keys);
  265. +
  266. +    return 0;
  267. +}
  268. +
  269. +static ssize_t
  270. +nv_procfs_write_registry(
  271. +    struct file       *file,
  272. +    const char __user *buffer,
  273. +    size_t             count,
  274. +    loff_t            *pos
  275.  )
  276.  {
  277. -    int len = 0;
  278. -    *eof = 1;
  279. +    int status = 0;
  280. +    nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
  281. +    char *proc_buffer;
  282. +    unsigned long bytes_left;
  283. +
  284. +    down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
  285. +
  286. +    bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
  287. +
  288. +    if (count == 0)
  289. +    {
  290. +        status = -EINVAL;
  291. +        goto done;
  292. +    }
  293. +    else if ((bytes_left == 0) || (count > bytes_left))
  294. +    {
  295. +        status = -ENOSPC;
  296. +        goto done;
  297. +    }
  298. +
  299. +    proc_buffer = &((char *)nvfp->data)[nvfp->off];
  300. +
  301. +    if (copy_from_user(proc_buffer, buffer, count))
  302. +    {
  303. +        nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
  304. +        status = -EFAULT;
  305. +    }
  306. +    else
  307. +    {
  308. +        nvfp->proc_data = PDE_DATA(file->f_inode);
  309. +        nvfp->off += count;
  310. +    }
  311.  
  312. -    len += sprintf(page+len, "NVRM version: %s\n", pNVRM_ID);
  313. -    len += sprintf(page+len, "GCC version:  %s\n", NV_COMPILER);
  314. +done:
  315. +    up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
  316.  
  317. -    return len;
  318. +    return ((status < 0) ? status : count);
  319.  }
  320.  
  321.  static int
  322. @@ -233,7 +308,7 @@
  323.      nv_stack_t *sp = NULL;
  324.  
  325.      if (0 == (file->f_mode & FMODE_WRITE))
  326. -        return 0;
  327. +        return single_open(file, nv_procfs_show_registry, PDE_DATA(inode));
  328.  
  329.      nvfp = nv_alloc_file_private();
  330.      if (nvfp == NULL)
  331. @@ -282,6 +357,9 @@
  332.      RM_STATUS rm_status;
  333.      int rc = 0;
  334.  
  335. +    if (0 == (file->f_mode & FMODE_WRITE))
  336. +        return single_release(inode, file);
  337. +
  338.      nvfp = NV_GET_FILE_PRIVATE(file);
  339.      if (nvfp == NULL)
  340.          return 0;
  341. @@ -346,121 +424,80 @@
  342.      return rc;
  343.  }
  344.  
  345. -static struct file_operations nv_procfs_registry_fops = {
  346. +static const struct file_operations nv_procfs_registry_fops = {
  347.      .open    = nv_procfs_open_registry,
  348. +    .read    = seq_read,
  349. +    .llseek  = seq_lseek,
  350. +    .write   = nv_procfs_write_registry,
  351.      .release = nv_procfs_close_registry,
  352.  };
  353.  
  354.  static int
  355. -nv_procfs_read_params(
  356. -    char  *page,
  357. -    char **start,
  358. -    off_t  off,
  359. -    int    count,
  360. -    int   *eof,
  361. -    void  *data
  362. +nv_procfs_show_params(
  363. +    struct seq_file *m,
  364. +    void *v
  365.  )
  366.  {
  367.      unsigned int i;
  368. -    int len = 0;
  369.      nv_parm_t *entry;
  370.  
  371. -    *eof = 1;
  372.  
  373.      for (i = 0; (entry = &nv_parms[i])->name != NULL; i++)
  374. -        len += sprintf(page+len, "%s: %u\n", entry->name, *entry->data);
  375. +        seq_printf(m, "%s: %u\n", entry->name, *entry->data);
  376.  
  377. -    len += sprintf(page+len, "RegistryDwords: \"%s\"\n",
  378. +    seq_printf(m, "RegistryDwords: \"%s\"\n",
  379.                  (NVreg_RegistryDwords != NULL) ? NVreg_RegistryDwords : "");
  380. -    len += sprintf(page+len, "RmMsg: \"%s\"\n",
  381. +    seq_printf(m, "RmMsg: \"%s\"\n",
  382.                  (NVreg_RmMsg != NULL) ? NVreg_RmMsg : "");
  383. -    return len;
  384. +    return 0;
  385.  }
  386.  
  387.  static int
  388. -nv_procfs_read_registry(
  389. -    char  *page,
  390. -    char **start,
  391. -    off_t  off,
  392. -    int    count,
  393. -    int   *eof,
  394. -    void  *data
  395. -)
  396. +nv_procfs_open_params(
  397. +    struct inode *inode,
  398. +    struct file *file
  399. +)    
  400.  {
  401. -    nv_state_t *nv = data;
  402. -    nv_linux_state_t *nvl = NULL;
  403. -    char *registry_keys;
  404. +    return single_open(file, nv_procfs_show_params, NULL);
  405. +}
  406.  
  407. -    if (nv != NULL)
  408. -        nvl = NV_GET_NVL_FROM_NV_STATE(nv);
  409. -    registry_keys = ((nvl != NULL) ?
  410. -            nvl->registry_keys : nv_registry_keys);
  411. +static const struct file_operations nv_procfs_params_fops = {
  412. +    .owner   = THIS_MODULE,
  413. +    .open    = nv_procfs_open_params,
  414. +    .read    = seq_read,
  415. +    .llseek  = seq_lseek,
  416. +    .release = single_release,
  417. +};
  418.  
  419. -    *eof = 1;
  420. -    return sprintf(page, "Binary: \"%s\"\n", registry_keys);
  421. -}
  422.  
  423.  static int
  424. -nv_procfs_write_registry(
  425. -    struct file   *file,
  426. -    const char    *buffer,
  427. -    unsigned long  count,
  428. -    void          *data
  429. +nv_procfs_show_text_file(
  430. +    struct seq_file *m,
  431. +    void *v
  432.  )
  433.  {
  434. -    int status = 0;
  435. -    nv_file_private_t *nvfp = NV_GET_FILE_PRIVATE(file);
  436. -    char *proc_buffer;
  437. -    unsigned long bytes_left;
  438. -
  439. -    down(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
  440. -
  441. -    bytes_left = (NV_PROC_WRITE_BUFFER_SIZE - nvfp->off - 1);
  442. +    seq_printf(m, "%s", (char *)m->private);
  443.  
  444. -    if (count == 0)
  445. -    {
  446. -        status = -EINVAL;
  447. -        goto done;
  448. -    }
  449. -    else if ((bytes_left == 0) || (count > bytes_left))
  450. -    {
  451. -        status = -ENOSPC;
  452. -        goto done;
  453. -    }
  454. -
  455. -    proc_buffer = &((char *)nvfp->data)[nvfp->off];
  456. -
  457. -    if (copy_from_user(proc_buffer, buffer, count))
  458. -    {
  459. -        nv_printf(NV_DBG_ERRORS, "NVRM: failed to copy in proc data!\n");
  460. -        status = -EFAULT;
  461. -    }
  462. -    else
  463. -    {
  464. -        nvfp->proc_data = data;
  465. -        nvfp->off += count;
  466. -    }
  467. -
  468. -done:
  469. -    up(&nvfp->fops_sp_lock[NV_FOPS_STACK_INDEX_PROCFS]);
  470. -
  471. -    return ((status < 0) ? status : (int)count);
  472. +    return 0;
  473.  }
  474.  
  475.  static int
  476. -nv_procfs_read_text_file(
  477. -    char  *page,
  478. -    char **start,
  479. -    off_t  off,
  480. -    int    count,
  481. -    int   *eof,
  482. -    void  *data
  483. +nv_procfs_open_text_file(
  484. +    struct inode *inode,
  485. +    struct file *file
  486.  )
  487.  {
  488. -    *eof = 1;
  489. -    return sprintf(page, "%s", (char *)data);
  490. +    return single_open(file, nv_procfs_show_text_file, PDE_DATA(inode));
  491.  }
  492.  
  493. +static const struct file_operations nv_procfs_text_fops = {
  494. +    .owner   = THIS_MODULE,
  495. +    .open    = nv_procfs_open_text_file,
  496. +    .read    = seq_read,
  497. +    .llseek  = seq_lseek,
  498. +    .release = single_release,
  499. +};
  500. +
  501.  static void
  502.  nv_procfs_add_text_file(
  503.      struct proc_dir_entry *parent,
  504. @@ -469,22 +506,7 @@
  505.      const char *text
  506.  )
  507.  {
  508. -    NV_CREATE_PROC_FILE(filename, parent,
  509. -            nv_procfs_read_text_file, NULL, NULL, (void *)text);
  510. -}
  511. -
  512. -static void nv_procfs_unregister_all(struct proc_dir_entry *entry)
  513. -{
  514. -    while (entry)
  515. -    {
  516. -        struct proc_dir_entry *next = entry->next;
  517. -        if (entry->subdir)
  518. -            nv_procfs_unregister_all(entry->subdir);
  519. -        remove_proc_entry(entry->name, entry->parent);
  520. -        if (entry == proc_nvidia)
  521. -            break;
  522. -        entry = next;
  523. -    }
  524. +    proc_create_data(filename, NV_PROC_RO, parent, &nv_procfs_text_fops, (void *)text);
  525.  }
  526.  #endif
  527.  
  528. @@ -513,26 +535,11 @@
  529.      if (!proc_nvidia)
  530.          goto failed;
  531.  
  532. -    entry = NV_CREATE_PROC_FILE("params", proc_nvidia,
  533. -        nv_procfs_read_params, NULL, NULL, NULL);
  534. +    entry = proc_create("params", NV_PROC_RO, proc_nvidia, &nv_procfs_params_fops);
  535.      if (!entry)
  536.          goto failed;
  537.  
  538. -    /*
  539. -     * entry->proc_fops originally points to a constant
  540. -     * structure, so to add more methods for the
  541. -     * binary registry write path, we need to replace the
  542. -     * said entry->proc_fops with a new fops structure.
  543. -     * However, in preparation for this, we need to preserve
  544. -     * the procfs read() and write() operations.
  545. -     */
  546. -    nv_procfs_registry_fops.read = entry->proc_fops->read;
  547. -    nv_procfs_registry_fops.write = entry->proc_fops->write;
  548. -
  549. -    entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
  550. -        nv_procfs_read_registry,
  551. -        nv_procfs_write_registry,
  552. -        &nv_procfs_registry_fops, NULL);
  553. +    entry = proc_create("registry", NV_PROC_RW, proc_nvidia, &nv_procfs_registry_fops);
  554.      if (!entry)
  555.          goto failed;
  556.  
  557. @@ -553,8 +560,7 @@
  558.  
  559.      nv_procfs_add_text_file(proc_nvidia_patches, "README", __README_patches);
  560.  
  561. -    entry = NV_CREATE_PROC_FILE("version", proc_nvidia,
  562. -        nv_procfs_read_version, NULL, NULL, NULL);
  563. +    entry = proc_create("version", NV_PROC_RO, proc_nvidia, &nv_procfs_version_fops);
  564.      if (!entry)
  565.          goto failed;
  566.  
  567. @@ -571,15 +577,11 @@
  568.          if (!proc_nvidia_gpu)
  569.              goto failed;
  570.  
  571. -        entry = NV_CREATE_PROC_FILE("information", proc_nvidia_gpu,
  572. -            nv_procfs_read_gpu_info, NULL, NULL, nv);
  573. +   entry = proc_create_data("information", NV_PROC_RO, proc_nvidia_gpu, &nv_procfs_gpu_info_fops, nv);
  574.          if (!entry)
  575.              goto failed;
  576.  
  577. -        entry = NV_CREATE_PROC_FILE("registry", proc_nvidia_gpu,
  578. -            nv_procfs_read_registry,
  579. -            nv_procfs_write_registry,
  580. -            &nv_procfs_registry_fops, nv);
  581. +   entry = proc_create_data("registry", NV_PROC_RW, proc_nvidia_gpu, &nv_procfs_registry_fops, nv);
  582.          if (!entry)
  583.              goto failed;
  584.      }
  585. @@ -587,7 +589,7 @@
  586.      return 0;
  587.  #if defined(CONFIG_PROC_FS)
  588.  failed:
  589. -    nv_procfs_unregister_all(proc_nvidia);
  590. +    remove_proc_subtree("nvidia", proc_nvidia);
  591.      return -1;
  592.  #endif
  593.  }
  594. @@ -595,6 +597,6 @@
  595.  void nv_unregister_procfs(void)
  596.  {
  597.  #if defined(CONFIG_PROC_FS)
  598. -    nv_procfs_unregister_all(proc_nvidia);
  599. +    remove_proc_subtree("nvidia", proc_nvidia);
  600.  #endif
  601.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement