| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * sch311x_wdt.c - Driver for the SCH311x Super-I/O chips |
|---|
| 3 | 4 | * integrated watchdog. |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * (c) Copyright 2008 Wim Van Sebroeck <wim@iguana.be>. |
|---|
| 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. |
|---|
| 11 | 7 | * |
|---|
| 12 | 8 | * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor |
|---|
| 13 | 9 | * provide warranty for any of this software. This material is |
|---|
| .. | .. |
|---|
| 299 | 295 | if (sch311x_wdt_set_heartbeat(new_timeout)) |
|---|
| 300 | 296 | return -EINVAL; |
|---|
| 301 | 297 | sch311x_wdt_keepalive(); |
|---|
| 302 | | - /* Fall through */ |
|---|
| 298 | + fallthrough; |
|---|
| 303 | 299 | case WDIOC_GETTIMEOUT: |
|---|
| 304 | 300 | return put_user(timeout, p); |
|---|
| 305 | 301 | default: |
|---|
| .. | .. |
|---|
| 316 | 312 | * Activate |
|---|
| 317 | 313 | */ |
|---|
| 318 | 314 | sch311x_wdt_start(); |
|---|
| 319 | | - return nonseekable_open(inode, file); |
|---|
| 315 | + return stream_open(inode, file); |
|---|
| 320 | 316 | } |
|---|
| 321 | 317 | |
|---|
| 322 | 318 | static int sch311x_wdt_close(struct inode *inode, struct file *file) |
|---|
| .. | .. |
|---|
| 341 | 337 | .llseek = no_llseek, |
|---|
| 342 | 338 | .write = sch311x_wdt_write, |
|---|
| 343 | 339 | .unlocked_ioctl = sch311x_wdt_ioctl, |
|---|
| 340 | + .compat_ioctl = compat_ptr_ioctl, |
|---|
| 344 | 341 | .open = sch311x_wdt_open, |
|---|
| 345 | 342 | .release = sch311x_wdt_close, |
|---|
| 346 | 343 | }; |
|---|