mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
host1x_emu: Fix Host1x_EMU devnode permission
Set R/W permission for group and others. Bug 5019709 Change-Id: Ia007623c891a10669ba92ab4de1d50a1d4f7ce9f Signed-off-by: amitabhd <amitabhd@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3271151 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Leslin Varghese <lvarghese@nvidia.com> Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
@@ -307,6 +307,16 @@ static const struct file_operations host1x_ctrlops = {
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(NV_CLASS_STRUCT_DEVNODE_HAS_CONST_DEV_ARG) /* Linux v6.2 */
|
||||
static char *host1x_emu_devnode(const struct device *dev, umode_t *mode)
|
||||
#else
|
||||
static char *host1x_emu_devnode(struct device *dev, umode_t *mode)
|
||||
#endif
|
||||
{
|
||||
*mode = 0666;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int host1x_user_init(struct host1x *host)
|
||||
{
|
||||
int err;
|
||||
@@ -328,6 +338,7 @@ int host1x_user_init(struct host1x *host)
|
||||
dev_err(host->dev, "failed to reserve chrdev region\n");
|
||||
goto fail;
|
||||
}
|
||||
host->host1x_class->devnode = host1x_emu_devnode;
|
||||
|
||||
host->major = MAJOR(devno);
|
||||
host->next_minor += 1;
|
||||
|
||||
Reference in New Issue
Block a user