Guest User

NVIDIA driver 325.08 patch for Linux kernel 3.10

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