device pointer is const now

This commit is contained in:
internal 2023-05-05 13:04:07 +02:00
parent 5bfa228d71
commit 626aa6d7be
1 changed files with 4 additions and 0 deletions

View File

@ -3469,7 +3469,11 @@ static const struct file_operations ddb_fops = {
#if (KERNEL_VERSION(3, 4, 0) > LINUX_VERSION_CODE)
static char *ddb_devnode(struct device *device, mode_t *mode)
#else
#if (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE)
static char *ddb_devnode(struct device *device, umode_t *mode)
#else
static char *ddb_devnode(const struct device *device, umode_t *mode)
#endif
#endif
{
struct ddb *dev = dev_get_drvdata(device);