hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/sa1100_wdt.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Watchdog driver for the SA11x0/PXA2xx
34 *
45 * (c) Copyright 2000 Oleg Drokin <green@crimea.edu>
56 * Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; either version
10
- * 2 of the License, or (at your option) any later version.
117 *
128 * Neither Oleg Drokin nor iXcelerator.com admit liability nor provide
139 * warranty for any of this software. This material is provided
....@@ -59,7 +55,7 @@
5955 writel_relaxed(OSSR_M3, OSSR);
6056 writel_relaxed(OWER_WME, OWER);
6157 writel_relaxed(readl_relaxed(OIER) | OIER_E3, OIER);
62
- return nonseekable_open(inode, file);
58
+ return stream_open(inode, file);
6359 }
6460
6561 /*
....@@ -131,7 +127,7 @@
131127
132128 pre_margin = oscr_freq * time;
133129 writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3);
134
- /*fall through*/
130
+ fallthrough;
135131
136132 case WDIOC_GETTIMEOUT:
137133 ret = put_user(pre_margin / oscr_freq, p);
....@@ -145,6 +141,7 @@
145141 .llseek = no_llseek,
146142 .write = sa1100dog_write,
147143 .unlocked_ioctl = sa1100dog_ioctl,
144
+ .compat_ioctl = compat_ptr_ioctl,
148145 .open = sa1100dog_open,
149146 .release = sa1100dog_release,
150147 };