forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/ti/wlcore/debugfs.c
....@@ -1,24 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * This file is part of wl1271
34 *
45 * Copyright (C) 2009 Nokia Corporation
56 *
67 * 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
- *
228 */
239
2410 #include "debugfs.h"
....@@ -134,13 +120,6 @@
134120
135121 pm_runtime_mark_last_busy(wl->dev);
136122 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
-{
144123 }
145124
146125 #define WL12XX_CONF_DEBUGFS(param, conf_sub_struct, \
....@@ -1301,11 +1280,10 @@
13011280 .llseek = default_llseek,
13021281 };
13031282
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)
13061285 {
1307
- int ret = 0;
1308
- struct dentry *entry, *streaming;
1286
+ struct dentry *streaming;
13091287
13101288 DEBUGFS_ADD(tx_queue_len, rootdir);
13111289 DEBUGFS_ADD(retry_count, rootdir);
....@@ -1330,23 +1308,11 @@
13301308 DEBUGFS_ADD(fw_logger, rootdir);
13311309
13321310 streaming = debugfs_create_dir("rx_streaming", rootdir);
1333
- if (!streaming || IS_ERR(streaming))
1334
- goto err;
13351311
13361312 DEBUGFS_ADD_PREFIX(rx_streaming, interval, streaming);
13371313 DEBUGFS_ADD_PREFIX(rx_streaming, always, streaming);
13381314
13391315 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;
13501316 }
13511317
13521318 void wl1271_debugfs_reset(struct wl1271 *wl)
....@@ -1367,11 +1333,6 @@
13671333 rootdir = debugfs_create_dir(KBUILD_MODNAME,
13681334 wl->hw->wiphy->debugfsdir);
13691335
1370
- if (IS_ERR(rootdir)) {
1371
- ret = PTR_ERR(rootdir);
1372
- goto out;
1373
- }
1374
-
13751336 wl->stats.fw_stats = kzalloc(wl->stats.fw_stats_len, GFP_KERNEL);
13761337 if (!wl->stats.fw_stats) {
13771338 ret = -ENOMEM;
....@@ -1380,9 +1341,7 @@
13801341
13811342 wl->stats.fw_stats_update = jiffies;
13821343
1383
- ret = wl1271_debugfs_add_files(wl, rootdir);
1384
- if (ret < 0)
1385
- goto out_exit;
1344
+ wl1271_debugfs_add_files(wl, rootdir);
13861345
13871346 ret = wlcore_debugfs_init(wl, rootdir);
13881347 if (ret < 0)