mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
gpu: host1x-fence: Fix build for Linux v6.2
Upstream Linux kernel commit ff62b8e6588f ("driver core: make struct
class.devnode() take a const *") updated the 'devnode' function pointer
under the class structure to take a const device struct. This breaks
building the Tegra host1x-fence driver with Linux v6.2. Make the
necessary changes to the host1x-fence driver to fix the build breakage.
Bug 3936429
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: Ia7abb62424c9532342a16ca7b5e8470e96b91d25
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2841034
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
56a13937ba
commit
ee4413e974
@@ -16,6 +16,7 @@
|
|||||||
#include <linux/poll.h>
|
#include <linux/poll.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/sync_file.h>
|
#include <linux/sync_file.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#include "include/uapi/linux/host1x-fence.h"
|
#include "include/uapi/linux/host1x-fence.h"
|
||||||
|
|
||||||
@@ -407,7 +408,11 @@ static const struct file_operations dev_file_fops = {
|
|||||||
.compat_ioctl = dev_file_ioctl,
|
.compat_ioctl = dev_file_ioctl,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0))
|
||||||
static char *host1x_fence_devnode(struct device *dev, umode_t *mode)
|
static char *host1x_fence_devnode(struct device *dev, umode_t *mode)
|
||||||
|
#else
|
||||||
|
static char *host1x_fence_devnode(const struct device *dev, umode_t *mode)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
*mode = 0666;
|
*mode = 0666;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user