hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/watchdog/wdrtas.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * FIXME: add wdrtas_get_status and wdrtas_get_boot_status as soon as
34 * RTAS calls are available
....@@ -10,20 +11,6 @@
1011 * device driver to exploit watchdog RTAS functions
1112 *
1213 * Authors : Utz Bacher <utz.bacher@de.ibm.com>
13
- *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 2, or (at your option)
17
- * any later version.
18
- *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
23
- *
24
- * You should have received a copy of the GNU General Public License
25
- * along with this program; if not, write to the Free Software
26
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2714 */
2815
2916 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -345,7 +332,7 @@
345332 wdrtas_interval = i;
346333 else
347334 wdrtas_interval = wdrtas_get_interval(i);
348
- /* fallthrough */
335
+ fallthrough;
349336
350337 case WDIOC_GETTIMEOUT:
351338 return put_user(wdrtas_interval, argp);
....@@ -376,7 +363,7 @@
376363 wdrtas_timer_start();
377364 wdrtas_timer_keepalive();
378365
379
- return nonseekable_open(inode, file);
366
+ return stream_open(inode, file);
380367 }
381368
382369 /**
....@@ -442,7 +429,7 @@
442429 */
443430 static int wdrtas_temp_open(struct inode *inode, struct file *file)
444431 {
445
- return nonseekable_open(inode, file);
432
+ return stream_open(inode, file);
446433 }
447434
448435 /**
....@@ -485,6 +472,7 @@
485472 .llseek = no_llseek,
486473 .write = wdrtas_write,
487474 .unlocked_ioctl = wdrtas_ioctl,
475
+ .compat_ioctl = compat_ptr_ioctl,
488476 .open = wdrtas_open,
489477 .release = wdrtas_close,
490478 };