Commit b6dfb247 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

compat_ioctl: move WDIOC handling into wdt drivers



All watchdog drivers implement the same set of ioctl commands, and
fortunately all of them are compatible between 32-bit and 64-bit
architectures.

Modern drivers always go through drivers/watchdog/wdt.c as an abstraction
layer, but older ones implement their own file_operations on a character
device for this.

Move the handling from fs/compat_ioctl.c into the individual drivers.

Note that most of the legacy drivers will never be used on 64-bit
hardware, because they are for an old 32-bit SoC implementation, but
doing them all at once is safer than trying to guess which ones do
or do not need the compat_ioctl handling.

Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 314999dc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -650,6 +650,7 @@ static const struct file_operations mpc52xx_wdt_fops = {
	.llseek		= no_llseek,
	.write		= mpc52xx_wdt_write,
	.unlocked_ioctl = mpc52xx_wdt_ioctl,
	.compat_ioctl	= compat_ptr_ioctl,
	.open		= mpc52xx_wdt_open,
	.release	= mpc52xx_wdt_release,
};
+1 −0
Original line number Diff line number Diff line
@@ -165,6 +165,7 @@ static const struct file_operations harddog_fops = {
	.owner		= THIS_MODULE,
	.write		= harddog_write,
	.unlocked_ioctl	= harddog_ioctl,
	.compat_ioctl	= compat_ptr_ioctl,
	.open		= harddog_open,
	.release	= harddog_release,
	.llseek		= no_llseek,
+1 −0
Original line number Diff line number Diff line
@@ -893,6 +893,7 @@ static const struct file_operations ipmi_wdog_fops = {
	.poll    = ipmi_poll,
	.write   = ipmi_write,
	.unlocked_ioctl = ipmi_unlocked_ioctl,
	.compat_ioctl	= compat_ptr_ioctl,
	.open    = ipmi_open,
	.release = ipmi_close,
	.fasync  = ipmi_fasync,
+1 −0
Original line number Diff line number Diff line
@@ -954,6 +954,7 @@ static const struct file_operations watchdog_fops = {
	.release = watchdog_release,
	.write = watchdog_write,
	.unlocked_ioctl = watchdog_ioctl,
	.compat_ioctl = compat_ptr_ioctl,
};


+1 −0
Original line number Diff line number Diff line
@@ -1458,6 +1458,7 @@ static const struct file_operations watchdog_fops = {
	.release = watchdog_close,
	.write = watchdog_write,
	.unlocked_ioctl = watchdog_ioctl,
	.compat_ioctl = compat_ptr_ioctl,
};

/*
Loading