.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * This file is part of wl1271 |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2009 Nokia Corporation |
---|
5 | 6 | * |
---|
6 | 7 | * Contact: Luciano Coelho <luciano.coelho@nokia.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or |
---|
9 | | - * modify it under the terms of the GNU General Public License |
---|
10 | | - * version 2 as published by the Free Software Foundation. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, but |
---|
13 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
15 | | - * General Public License for more details. |
---|
16 | | - * |
---|
17 | | - * You should have received a copy of the GNU General Public License |
---|
18 | | - * along with this program; if not, write to the Free Software |
---|
19 | | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
---|
20 | | - * 02110-1301 USA |
---|
21 | | - * |
---|
22 | 8 | */ |
---|
23 | 9 | |
---|
24 | 10 | #include "debugfs.h" |
---|
.. | .. |
---|
134 | 120 | |
---|
135 | 121 | pm_runtime_mark_last_busy(wl->dev); |
---|
136 | 122 | pm_runtime_put_autosuspend(wl->dev); |
---|
137 | | -} |
---|
138 | | - |
---|
139 | | - |
---|
140 | | -static inline void no_write_handler(struct wl1271 *wl, |
---|
141 | | - unsigned long value, |
---|
142 | | - unsigned long param) |
---|
143 | | -{ |
---|
144 | 123 | } |
---|
145 | 124 | |
---|
146 | 125 | #define WL12XX_CONF_DEBUGFS(param, conf_sub_struct, \ |
---|
.. | .. |
---|
1301 | 1280 | .llseek = default_llseek, |
---|
1302 | 1281 | }; |
---|
1303 | 1282 | |
---|
1304 | | -static int wl1271_debugfs_add_files(struct wl1271 *wl, |
---|
1305 | | - struct dentry *rootdir) |
---|
| 1283 | +static void wl1271_debugfs_add_files(struct wl1271 *wl, |
---|
| 1284 | + struct dentry *rootdir) |
---|
1306 | 1285 | { |
---|
1307 | | - int ret = 0; |
---|
1308 | | - struct dentry *entry, *streaming; |
---|
| 1286 | + struct dentry *streaming; |
---|
1309 | 1287 | |
---|
1310 | 1288 | DEBUGFS_ADD(tx_queue_len, rootdir); |
---|
1311 | 1289 | DEBUGFS_ADD(retry_count, rootdir); |
---|
.. | .. |
---|
1330 | 1308 | DEBUGFS_ADD(fw_logger, rootdir); |
---|
1331 | 1309 | |
---|
1332 | 1310 | streaming = debugfs_create_dir("rx_streaming", rootdir); |
---|
1333 | | - if (!streaming || IS_ERR(streaming)) |
---|
1334 | | - goto err; |
---|
1335 | 1311 | |
---|
1336 | 1312 | DEBUGFS_ADD_PREFIX(rx_streaming, interval, streaming); |
---|
1337 | 1313 | DEBUGFS_ADD_PREFIX(rx_streaming, always, streaming); |
---|
1338 | 1314 | |
---|
1339 | 1315 | DEBUGFS_ADD_PREFIX(dev, mem, rootdir); |
---|
1340 | | - |
---|
1341 | | - return 0; |
---|
1342 | | - |
---|
1343 | | -err: |
---|
1344 | | - if (IS_ERR(entry)) |
---|
1345 | | - ret = PTR_ERR(entry); |
---|
1346 | | - else |
---|
1347 | | - ret = -ENOMEM; |
---|
1348 | | - |
---|
1349 | | - return ret; |
---|
1350 | 1316 | } |
---|
1351 | 1317 | |
---|
1352 | 1318 | void wl1271_debugfs_reset(struct wl1271 *wl) |
---|
.. | .. |
---|
1367 | 1333 | rootdir = debugfs_create_dir(KBUILD_MODNAME, |
---|
1368 | 1334 | wl->hw->wiphy->debugfsdir); |
---|
1369 | 1335 | |
---|
1370 | | - if (IS_ERR(rootdir)) { |
---|
1371 | | - ret = PTR_ERR(rootdir); |
---|
1372 | | - goto out; |
---|
1373 | | - } |
---|
1374 | | - |
---|
1375 | 1336 | wl->stats.fw_stats = kzalloc(wl->stats.fw_stats_len, GFP_KERNEL); |
---|
1376 | 1337 | if (!wl->stats.fw_stats) { |
---|
1377 | 1338 | ret = -ENOMEM; |
---|
.. | .. |
---|
1380 | 1341 | |
---|
1381 | 1342 | wl->stats.fw_stats_update = jiffies; |
---|
1382 | 1343 | |
---|
1383 | | - ret = wl1271_debugfs_add_files(wl, rootdir); |
---|
1384 | | - if (ret < 0) |
---|
1385 | | - goto out_exit; |
---|
| 1344 | + wl1271_debugfs_add_files(wl, rootdir); |
---|
1386 | 1345 | |
---|
1387 | 1346 | ret = wlcore_debugfs_init(wl, rootdir); |
---|
1388 | 1347 | if (ret < 0) |
---|