hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/m54xx_wdt.c
....@@ -29,6 +29,7 @@
2929 #include <linux/bitops.h>
3030 #include <linux/ioport.h>
3131 #include <linux/uaccess.h>
32
+#include <linux/io.h>
3233
3334 #include <asm/coldfire.h>
3435 #include <asm/m54xxsim.h>
....@@ -85,7 +86,7 @@
8586
8687 clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
8788 wdt_enable();
88
- return nonseekable_open(inode, file);
89
+ return stream_open(inode, file);
8990 }
9091
9192 static ssize_t m54xx_wdt_write(struct file *file, const char *data,
....@@ -154,7 +155,7 @@
154155
155156 heartbeat = time;
156157 wdt_enable();
157
- /* Fall through */
158
+ fallthrough;
158159
159160 case WDIOC_GETTIMEOUT:
160161 ret = put_user(heartbeat, (int *)arg);
....@@ -183,6 +184,7 @@
183184 .llseek = no_llseek,
184185 .write = m54xx_wdt_write,
185186 .unlocked_ioctl = m54xx_wdt_ioctl,
187
+ .compat_ioctl = compat_ptr_ioctl,
186188 .open = m54xx_wdt_open,
187189 .release = m54xx_wdt_release,
188190 };