| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Advantech Single Board Computer WDT driver |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * |
|---|
| 9 | 10 | * (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, |
|---|
| 10 | 11 | * All Rights Reserved. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is free software; you can redistribute it and/or |
|---|
| 13 | | - * modify it under the terms of the GNU General Public License |
|---|
| 14 | | - * as published by the Free Software Foundation; either version |
|---|
| 15 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 16 | 12 | * |
|---|
| 17 | 13 | * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide |
|---|
| 18 | 14 | * warranty for any of this software. This material is provided |
|---|
| .. | .. |
|---|
| 181 | 177 | if (advwdt_set_heartbeat(new_timeout)) |
|---|
| 182 | 178 | return -EINVAL; |
|---|
| 183 | 179 | advwdt_ping(); |
|---|
| 184 | | - /* fall through */ |
|---|
| 180 | + fallthrough; |
|---|
| 185 | 181 | case WDIOC_GETTIMEOUT: |
|---|
| 186 | 182 | return put_user(timeout, p); |
|---|
| 187 | 183 | default: |
|---|
| .. | .. |
|---|
| 199 | 195 | */ |
|---|
| 200 | 196 | |
|---|
| 201 | 197 | advwdt_ping(); |
|---|
| 202 | | - return nonseekable_open(inode, file); |
|---|
| 198 | + return stream_open(inode, file); |
|---|
| 203 | 199 | } |
|---|
| 204 | 200 | |
|---|
| 205 | 201 | static int advwdt_close(struct inode *inode, struct file *file) |
|---|
| .. | .. |
|---|
| 224 | 220 | .llseek = no_llseek, |
|---|
| 225 | 221 | .write = advwdt_write, |
|---|
| 226 | 222 | .unlocked_ioctl = advwdt_ioctl, |
|---|
| 223 | + .compat_ioctl = compat_ptr_ioctl, |
|---|
| 227 | 224 | .open = advwdt_open, |
|---|
| 228 | 225 | .release = advwdt_close, |
|---|
| 229 | 226 | }; |
|---|