Now passes checkpatch
This commit is contained in:
parent
deb6fbd6c9
commit
8d5f6aab17
3 changed files with 12 additions and 6 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include "my-ioctl.h"
|
#include "my-ioctl.h"
|
||||||
|
|
||||||
|
|
@ -14,7 +16,7 @@ static struct class *cls;
|
||||||
static long my_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
|
static long my_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
|
||||||
|
|
||||||
/* See: https://elixir.bootlin.com/linux/v6.14.5/source/include/linux/fs.h#L2131 */
|
/* See: https://elixir.bootlin.com/linux/v6.14.5/source/include/linux/fs.h#L2131 */
|
||||||
static struct file_operations fops = {
|
static const struct file_operations fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.unlocked_ioctl = my_ioctl,
|
.unlocked_ioctl = my_ioctl,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
|
||||||
#ifndef MY_IOCTL_H
|
#ifndef MY_IOCTL_H
|
||||||
#define MY_IOCTL_H
|
#define MY_IOCTL_H
|
||||||
#include <linux/ioctl.h>
|
#include <linux/ioctl.h>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
// #include <stdlib.h>
|
// #include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue