fix build for < 6.2 again

main
anna 1 year ago
parent b38189d3c4
commit 806d91be53
Signed by: fef
GPG Key ID: EC22E476DC2D3D84

@ -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;

Loading…
Cancel
Save