Commit e2c71417 authored by Dimitris Lampridis's avatar Dimitris Lampridis

sw/drv: make driver build under kernel 6.2

parent f1dc7ba8
......@@ -38,14 +38,22 @@
static DEFINE_IDA(trtl_ida);
#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE
static int trtl_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
#else
static int trtl_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
#endif
{
add_uevent_var(env, "DEVMODE=%#o", 0660);
return 0;
}
#if KERNEL_VERSION(6, 2, 0) <= LINUX_VERSION_CODE
static char *trtl_devnode(const struct device *dev, umode_t *mode)
#else
static char *trtl_devnode(struct device *dev, umode_t *mode)
#endif
{
return kasprintf(GFP_KERNEL, "mockturtle/%s", dev_name(dev));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment