hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/geodewdt.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* Watchdog timer for machines with the CS5535/CS5536 companion chip
23 *
34 * Copyright (C) 2006-2007, Advanced Micro Devices, Inc.
45 * Copyright (C) 2009 Andres Salomon <dilinger@collabora.co.uk>
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 */
117
128 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -92,7 +88,7 @@
9288 __module_get(THIS_MODULE);
9389
9490 geodewdt_ping();
95
- return nonseekable_open(inode, file);
91
+ return stream_open(inode, file);
9692 }
9793
9894 static int geodewdt_release(struct inode *inode, struct file *file)
....@@ -189,7 +185,7 @@
189185
190186 if (geodewdt_set_heartbeat(interval))
191187 return -EINVAL;
192
- /* Fall through */
188
+ fallthrough;
193189 case WDIOC_GETTIMEOUT:
194190 return put_user(timeout, p);
195191
....@@ -205,6 +201,7 @@
205201 .llseek = no_llseek,
206202 .write = geodewdt_write,
207203 .unlocked_ioctl = geodewdt_ioctl,
204
+ .compat_ioctl = compat_ptr_ioctl,
208205 .open = geodewdt_open,
209206 .release = geodewdt_release,
210207 };