watchdog: cpwd: use generic compat_ptr_ioctl
authorArnd Bergmann <arnd@arndb.de>
Wed, 14 Aug 2019 20:42:32 +0000 (22:42 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Tue, 17 Sep 2019 06:59:02 +0000 (08:59 +0200)
commit68f28b01fb9e5fc3ec273104714bd71bac783845
tree764fd7eb0631892e28b40a0e8db816f5339667d4
parent31bfa64e9428c2ab6608377fb3d4c40e29c7f4ce
watchdog: cpwd: use generic compat_ptr_ioctl

The cpwd_compat_ioctl() contains a bogus mutex that dates
back to a leftover BKL instance.

Simplify the implementation by using the new compat_ptr_ioctl()
helper function that will do the right thing for all calls
here.

Note that WIOCSTART/WIOCSTOP don't take any arguments, so
the compat_ptr() conversion is not needed here, but it also
doesn't hurt.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20190814204259.120942-6-arnd@arndb.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/cpwd.c