summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
authorSri Krishna chowdary <schowdary@nvidia.com>2017-04-25 01:55:57 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-26 02:15:34 -0400
commit388113aa19c202edd261e49f8c169f0b31ade784 (patch)
treed147bfb42504d0555e762dcf565426571c841342 /drivers/gpu/nvgpu/gk20a/mm_gk20a.c
parent84dadb1a9ae2ab0473976ebf5ece1cb0d1e60205 (diff)
gpu: nvgpu: replace __alloc_fd with tegra_fd_alloc
nvgpu is being modularized for kernel-4.4 and newer kernels. __alloc_fd() can't be used on modules as it is not exported. So, use a wrapper tegra_fd_alloc() instead of __alloc_fd() bug 200290850 Change-Id: I0e63307d429774440753698643ba7620c1e1f9f6 Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com> Reviewed-on: http://git-master/r/1469313 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 00892e98..d95a2cde 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -21,7 +21,7 @@
21#include <linux/dma-mapping.h> 21#include <linux/dma-mapping.h>
22#include <linux/dma-attrs.h> 22#include <linux/dma-attrs.h>
23#include <linux/lcm.h> 23#include <linux/lcm.h>
24#include <linux/fdtable.h> 24#include <linux/platform/tegra/tegra_fd.h>
25#include <uapi/linux/nvgpu.h> 25#include <uapi/linux/nvgpu.h>
26#include <trace/events/gk20a.h> 26#include <trace/events/gk20a.h>
27 27
@@ -1874,7 +1874,7 @@ int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes)
1874 goto err_bfree; 1874 goto err_bfree;
1875 } 1875 }
1876 1876
1877 fd = __alloc_fd(current->files, 1024, sysctl_nr_open, O_RDWR); 1877 fd = tegra_alloc_fd(current->files, 1024, O_RDWR);
1878 if (fd < 0) { 1878 if (fd < 0) {
1879 /* ->release frees what we have done */ 1879 /* ->release frees what we have done */
1880 dma_buf_put(buf->dmabuf); 1880 dma_buf_put(buf->dmabuf);