hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/drivers/net/ieee802154/adf7242.c
....@@ -1,11 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Analog Devices ADF7242 Low-Power IEEE 802.15.4 Transceiver
34 *
45 * Copyright 2009-2017 Analog Devices Inc.
56 *
6
- * Licensed under the GPL-2 or later.
7
- *
8
- * http://www.analog.com/ADF7242
7
+ * https://www.analog.com/ADF7242
98 */
109
1110 #include <linux/kernel.h>
....@@ -1161,23 +1160,16 @@
11611160 return 0;
11621161 }
11631162
1164
-static int adf7242_debugfs_init(struct adf7242_local *lp)
1163
+static void adf7242_debugfs_init(struct adf7242_local *lp)
11651164 {
11661165 char debugfs_dir_name[DNAME_INLINE_LEN + 1] = "adf7242-";
1167
- struct dentry *stats;
11681166
11691167 strncat(debugfs_dir_name, dev_name(&lp->spi->dev), DNAME_INLINE_LEN);
11701168
11711169 lp->debugfs_root = debugfs_create_dir(debugfs_dir_name, NULL);
1172
- if (IS_ERR_OR_NULL(lp->debugfs_root))
1173
- return PTR_ERR_OR_ZERO(lp->debugfs_root);
11741170
1175
- stats = debugfs_create_devm_seqfile(&lp->spi->dev, "status",
1176
- lp->debugfs_root,
1177
- adf7242_stats_show);
1178
- return PTR_ERR_OR_ZERO(stats);
1179
-
1180
- return 0;
1171
+ debugfs_create_devm_seqfile(&lp->spi->dev, "status", lp->debugfs_root,
1172
+ adf7242_stats_show);
11811173 }
11821174
11831175 static const s32 adf7242_powers[] = {
....@@ -1318,10 +1310,11 @@
13181310
13191311 debugfs_remove_recursive(lp->debugfs_root);
13201312
1313
+ ieee802154_unregister_hw(lp->hw);
1314
+
13211315 cancel_delayed_work_sync(&lp->work);
13221316 destroy_workqueue(lp->wqueue);
13231317
1324
- ieee802154_unregister_hw(lp->hw);
13251318 mutex_destroy(&lp->bmux);
13261319 ieee802154_free_hw(lp->hw);
13271320