| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2006 - 2007 Ivo van Doorn |
|---|
| 3 | 4 | * Copyright (C) 2007 Dmitry Torokhov |
|---|
| 4 | 5 | * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 8 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | | - * (at your option) any later version. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | | - * GNU General Public License for more details. |
|---|
| 15 | | - * |
|---|
| 16 | | - * You should have received a copy of the GNU General Public License |
|---|
| 17 | | - * along with this program; if not, see <http://www.gnu.org/licenses/>. |
|---|
| 18 | 6 | */ |
|---|
| 19 | 7 | |
|---|
| 20 | 8 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 510 | 498 | /** |
|---|
| 511 | 499 | * rfkill_is_epo_lock_active - returns true EPO is active |
|---|
| 512 | 500 | * |
|---|
| 513 | | - * Returns 0 (false) if there is NOT an active EPO contidion, |
|---|
| 514 | | - * and 1 (true) if there is an active EPO contition, which |
|---|
| 501 | + * Returns 0 (false) if there is NOT an active EPO condition, |
|---|
| 502 | + * and 1 (true) if there is an active EPO condition, which |
|---|
| 515 | 503 | * locks all radios in one of the BLOCKED states. |
|---|
| 516 | 504 | * |
|---|
| 517 | 505 | * Can be called in atomic context. |
|---|
| .. | .. |
|---|
| 888 | 876 | |
|---|
| 889 | 877 | rfkill->suspended = false; |
|---|
| 890 | 878 | |
|---|
| 879 | + if (!rfkill->registered) |
|---|
| 880 | + return 0; |
|---|
| 881 | + |
|---|
| 891 | 882 | if (!rfkill->persistent) { |
|---|
| 892 | 883 | cur = !!(rfkill->state & RFKILL_BLOCK_SW); |
|---|
| 893 | 884 | rfkill_set_block(rfkill, cur); |
|---|
| .. | .. |
|---|
| 1146 | 1137 | |
|---|
| 1147 | 1138 | file->private_data = data; |
|---|
| 1148 | 1139 | |
|---|
| 1149 | | - return nonseekable_open(inode, file); |
|---|
| 1140 | + return stream_open(inode, file); |
|---|
| 1150 | 1141 | |
|---|
| 1151 | 1142 | free: |
|---|
| 1152 | 1143 | mutex_unlock(&data->mtx); |
|---|
| .. | .. |
|---|
| 1326 | 1317 | .release = rfkill_fop_release, |
|---|
| 1327 | 1318 | #ifdef CONFIG_RFKILL_INPUT |
|---|
| 1328 | 1319 | .unlocked_ioctl = rfkill_fop_ioctl, |
|---|
| 1329 | | - .compat_ioctl = rfkill_fop_ioctl, |
|---|
| 1320 | + .compat_ioctl = compat_ptr_ioctl, |
|---|
| 1330 | 1321 | #endif |
|---|
| 1331 | 1322 | .llseek = no_llseek, |
|---|
| 1332 | 1323 | }; |
|---|