hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/net/ieee802154/core.c
....@@ -1,15 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2007, 2008, 2009 Siemens AG
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2
6
- * as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
12
- *
134 */
145
156 #include <linux/slab.h>
....@@ -32,11 +23,6 @@
3223 LIST_HEAD(cfg802154_rdev_list);
3324 int cfg802154_rdev_list_generation;
3425
35
-static int wpan_phy_match(struct device *dev, const void *data)
36
-{
37
- return !strcmp(dev_name(dev), (const char *)data);
38
-}
39
-
4026 struct wpan_phy *wpan_phy_find(const char *str)
4127 {
4228 struct device *dev;
....@@ -44,7 +30,7 @@
4430 if (WARN_ON(!str))
4531 return NULL;
4632
47
- dev = class_find_device(&wpan_phy_class, NULL, str, wpan_phy_match);
33
+ dev = class_find_device_by_name(&wpan_phy_class, str);
4834 if (!dev)
4935 return NULL;
5036