diff options
| author | Pritesh Raithatha <praithatha@nvidia.com> | 2017-04-24 05:06:37 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-21 03:02:26 -0400 |
| commit | dffc917c67b5973fdcf93348b75488cb256f07cb (patch) | |
| tree | 184543906827160fb474cb85581a1f32a202b25c /include/linux | |
| parent | 0c67d7d220b8c62a5be184004249fe8e0d3a1735 (diff) | |
tegra: fd: Add wrapper for __alloc_fd
Modules like nvgpu and nvmap should to be able to allocate
all open fds and for this they need to call __alloc_fd()
rather than alloc_fd.
However, as __alloc_fd is not exported to modules, a wrapper
is being created and exported to the respective modules.
bug 200290850
Change-Id: Id245040842f71aadfc484711a23e8ce9dbfa872f
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1701552
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/platform/tegra/tegra_fd.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/platform/tegra/tegra_fd.h b/include/linux/platform/tegra/tegra_fd.h new file mode 100644 index 000000000..c30daa03c --- /dev/null +++ b/include/linux/platform/tegra/tegra_fd.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2017-2018, NVIDIA Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This software is licensed under the terms of the GNU General Public | ||
| 5 | * License version 2, as published by the Free Software Foundation, and | ||
| 6 | * may be copied, distributed, and modified under those terms. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/fdtable.h> | ||
| 16 | |||
| 17 | #ifndef __TEGRA_FD_H | ||
| 18 | #define __TEGRA_FD_H | ||
| 19 | |||
| 20 | int tegra_alloc_fd(struct files_struct *files, unsigned int start, | ||
| 21 | unsigned int flags); | ||
| 22 | |||
| 23 | #endif | ||
