summarylogtreecommitdiffstats
path: root/linux-6.3-rc2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'linux-6.3-rc2.patch')
-rw-r--r--linux-6.3-rc2.patch52
1 files changed, 40 insertions, 12 deletions
diff --git a/linux-6.3-rc2.patch b/linux-6.3-rc2.patch
index d372d5d89de0..349ed1c4e964 100644
--- a/linux-6.3-rc2.patch
+++ b/linux-6.3-rc2.patch
@@ -1,66 +1,94 @@
diff --unified --recursive --text a/ddcci/ddcci.c b/ddcci/ddcci.c
--- a/ddcci/ddcci.c
+++ b/ddcci/ddcci.c
-@@ -43,6 +43,7 @@
+@@ -43,6 +43,9 @@
struct bus_type ddcci_bus_type;
EXPORT_SYMBOL_GPL(ddcci_bus_type);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
+static bool ddcci_bus_registered;
++#endif
/* Assert neccessary string array sizes */
#ifndef sizeof_field
-@@ -931,7 +932,7 @@
+@@ -931,7 +934,11 @@
/* DDC/CI bus */
-static int ddcci_device_uevent(struct device *dev, struct kobj_uevent_env *env)
-+static int ddcci_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
++static int ddcci_device_uevent(
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ const
++#endif
++ struct device *dev, struct kobj_uevent_env *env)
{
struct ddcci_device *device = to_ddcci_device(dev);
char model[ARRAY_SIZE(device->model)];
-@@ -1011,7 +1012,7 @@
+@@ -1011,7 +1018,11 @@
kfree(device);
}
-static char *ddcci_devnode(struct device *dev,
-+static char *ddcci_devnode(const struct device *dev,
++static char *ddcci_devnode(
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ const
++#endif
++ struct device *dev,
umode_t *mode, kuid_t *uid, kgid_t *gid)
{
struct ddcci_device *device;
-@@ -1021,7 +1022,7 @@
+@@ -1021,7 +1032,11 @@
device->i2c_client->adapter->nr);
}
-static char *ddcci_dependent_devnode(struct device *dev,
-+static char *ddcci_dependent_devnode(const struct device *dev,
++static char *ddcci_dependent_devnode(
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ const
++#endif
++ struct device *dev,
umode_t *mode, kuid_t *uid, kgid_t *gid)
{
struct ddcci_device *device;
-@@ -1100,7 +1101,7 @@
+@@ -1100,7 +1115,13 @@
int ret;
/* Can't register until after driver model init */
- if (unlikely(WARN_ON(!ddcci_bus_type.p)))
-+ if (unlikely(WARN_ON(!ddcci_bus_registered)))
++ if (unlikely(WARN_ON(!
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
++ ddcci_bus_type.p
++#else
++ ddcci_bus_registered
++#endif
++ )))
return -EAGAIN;
pr_debug("registering driver [%s]\n", driver->driver.name);
-@@ -1672,8 +1673,9 @@
+@@ -1672,8 +1693,15 @@
}
/* I2C probe function */
-static int ddcci_probe(struct i2c_client *client, const struct i2c_device_id *id)
-+static int ddcci_probe(struct i2c_client *client)
++static int ddcci_probe(struct i2c_client *client
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
++ , const struct i2c_device_id *id)
++{
++#else
++ )
{
+ const struct i2c_device_id *id = i2c_client_get_device_id(client);
++#endif
int i, ret = -ENODEV, tmp;
unsigned char main_addr, addr;
struct ddcci_bus_drv_data *drv_data;
-@@ -1849,6 +1851,7 @@
+@@ -1849,6 +1877,9 @@
pr_err("failed to register bus 'ddcci'\n");
goto err_busreg;
}
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
+ ddcci_bus_registered = true;
++#endif
/* Register I2C driver */
ret = i2c_add_driver(&ddcci_driver);