| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Analog Devices ADF7242 Low-Power IEEE 802.15.4 Transceiver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2009-2017 Analog Devices Inc. |
|---|
| 5 | 6 | * |
|---|
| 6 | | - * Licensed under the GPL-2 or later. |
|---|
| 7 | | - * |
|---|
| 8 | | - * http://www.analog.com/ADF7242 |
|---|
| 7 | + * https://www.analog.com/ADF7242 |
|---|
| 9 | 8 | */ |
|---|
| 10 | 9 | |
|---|
| 11 | 10 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 1161 | 1160 | return 0; |
|---|
| 1162 | 1161 | } |
|---|
| 1163 | 1162 | |
|---|
| 1164 | | -static int adf7242_debugfs_init(struct adf7242_local *lp) |
|---|
| 1163 | +static void adf7242_debugfs_init(struct adf7242_local *lp) |
|---|
| 1165 | 1164 | { |
|---|
| 1166 | 1165 | char debugfs_dir_name[DNAME_INLINE_LEN + 1] = "adf7242-"; |
|---|
| 1167 | | - struct dentry *stats; |
|---|
| 1168 | 1166 | |
|---|
| 1169 | 1167 | strncat(debugfs_dir_name, dev_name(&lp->spi->dev), DNAME_INLINE_LEN); |
|---|
| 1170 | 1168 | |
|---|
| 1171 | 1169 | 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); |
|---|
| 1174 | 1170 | |
|---|
| 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); |
|---|
| 1181 | 1173 | } |
|---|
| 1182 | 1174 | |
|---|
| 1183 | 1175 | static const s32 adf7242_powers[] = { |
|---|
| .. | .. |
|---|
| 1318 | 1310 | |
|---|
| 1319 | 1311 | debugfs_remove_recursive(lp->debugfs_root); |
|---|
| 1320 | 1312 | |
|---|
| 1313 | + ieee802154_unregister_hw(lp->hw); |
|---|
| 1314 | + |
|---|
| 1321 | 1315 | cancel_delayed_work_sync(&lp->work); |
|---|
| 1322 | 1316 | destroy_workqueue(lp->wqueue); |
|---|
| 1323 | 1317 | |
|---|
| 1324 | | - ieee802154_unregister_hw(lp->hw); |
|---|
| 1325 | 1318 | mutex_destroy(&lp->bmux); |
|---|
| 1326 | 1319 | ieee802154_free_hw(lp->hw); |
|---|
| 1327 | 1320 | |
|---|