| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Industrial Computer Source WDT501 driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>, |
|---|
| 5 | 6 | * All Rights Reserved. |
|---|
| 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 Alan Cox nor CymruNet Ltd. admit liability nor provide |
|---|
| 13 | 9 | * warranty for any of this software. This material is provided |
|---|
| .. | .. |
|---|
| 393 | 389 | if (wdt_set_heartbeat(new_heartbeat)) |
|---|
| 394 | 390 | return -EINVAL; |
|---|
| 395 | 391 | wdt_ping(); |
|---|
| 396 | | - /* Fall */ |
|---|
| 392 | + fallthrough; |
|---|
| 397 | 393 | case WDIOC_GETTIMEOUT: |
|---|
| 398 | 394 | return put_user(heartbeat, p); |
|---|
| 399 | 395 | default: |
|---|
| .. | .. |
|---|
| 421 | 417 | * Activate |
|---|
| 422 | 418 | */ |
|---|
| 423 | 419 | wdt_start(); |
|---|
| 424 | | - return nonseekable_open(inode, file); |
|---|
| 420 | + return stream_open(inode, file); |
|---|
| 425 | 421 | } |
|---|
| 426 | 422 | |
|---|
| 427 | 423 | /** |
|---|
| .. | .. |
|---|
| 481 | 477 | |
|---|
| 482 | 478 | static int wdt_temp_open(struct inode *inode, struct file *file) |
|---|
| 483 | 479 | { |
|---|
| 484 | | - return nonseekable_open(inode, file); |
|---|
| 480 | + return stream_open(inode, file); |
|---|
| 485 | 481 | } |
|---|
| 486 | 482 | |
|---|
| 487 | 483 | /** |
|---|
| .. | .. |
|---|
| 527 | 523 | .llseek = no_llseek, |
|---|
| 528 | 524 | .write = wdt_write, |
|---|
| 529 | 525 | .unlocked_ioctl = wdt_ioctl, |
|---|
| 526 | + .compat_ioctl = compat_ptr_ioctl, |
|---|
| 530 | 527 | .open = wdt_open, |
|---|
| 531 | 528 | .release = wdt_release, |
|---|
| 532 | 529 | }; |
|---|