|
|
|
@ -8,6 +8,7 @@
|
|
|
|
|
#include <linux/random.h>
|
|
|
|
|
#include <linux/slab.h>
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
#include <linux/version.h>
|
|
|
|
|
|
|
|
|
|
MODULE_LICENSE("Dual BSD/GPL");
|
|
|
|
|
MODULE_AUTHOR("fef <owo@fef.moe>");
|
|
|
|
@ -67,7 +68,11 @@ static const struct file_operations keymash_fops = {
|
|
|
|
|
.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)
|
|
|
|
|
#endif
|
|
|
|
|
{
|
|
|
|
|
if (mode)
|
|
|
|
|
*mode = 0444;
|
|
|
|
|