fix build for < 6.2 again
This commit is contained in:
parent
b38189d3c4
commit
806d91be53
1 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include <linux/random.h>
|
#include <linux/random.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
MODULE_LICENSE("Dual BSD/GPL");
|
MODULE_LICENSE("Dual BSD/GPL");
|
||||||
MODULE_AUTHOR("fef <owo@fef.moe>");
|
MODULE_AUTHOR("fef <owo@fef.moe>");
|
||||||
|
@ -67,7 +68,11 @@ static const struct file_operations keymash_fops = {
|
||||||
.read = keymash_read,
|
.read = keymash_read,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)
|
||||||
|
static char *keymash_devnode(struct device *dev, umode_t *mode)
|
||||||
|
#else
|
||||||
static char *keymash_devnode(const struct device *dev, umode_t *mode)
|
static char *keymash_devnode(const struct device *dev, umode_t *mode)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (mode)
|
if (mode)
|
||||||
*mode = 0444;
|
*mode = 0444;
|
||||||
|
|
Loading…
Reference in a new issue