mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 22:28:00 +00:00
watchdog: cpwd: fix build regression
The compat_ptr_ioctl() infrastructure did not make it into
linux-5.4, so cpwd now fails to build.
Fix it by using an open-coded version.
Fixes: 68f28b01fb
("watchdog: cpwd: use generic compat_ptr_ioctl")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
parent
a99d8080aa
commit
c58e81341a
1 changed files with 7 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
#include <linux/timer.h>
|
#include <linux/timer.h>
|
||||||
|
#include <linux/compat.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
@ -473,6 +474,11 @@ static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static long cpwd_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||||
|
{
|
||||||
|
return cpwd_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
|
||||||
|
}
|
||||||
|
|
||||||
static ssize_t cpwd_write(struct file *file, const char __user *buf,
|
static ssize_t cpwd_write(struct file *file, const char __user *buf,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
|
@ -497,7 +503,7 @@ static ssize_t cpwd_read(struct file *file, char __user *buffer,
|
||||||
static const struct file_operations cpwd_fops = {
|
static const struct file_operations cpwd_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.unlocked_ioctl = cpwd_ioctl,
|
.unlocked_ioctl = cpwd_ioctl,
|
||||||
.compat_ioctl = compat_ptr_ioctl,
|
.compat_ioctl = cpwd_compat_ioctl,
|
||||||
.open = cpwd_open,
|
.open = cpwd_open,
|
||||||
.write = cpwd_write,
|
.write = cpwd_write,
|
||||||
.read = cpwd_read,
|
.read = cpwd_read,
|
||||||
|
|
Loading…
Add table
Reference in a new issue