.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * 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 | | - * |
---|
13 | 4 | */ |
---|
14 | 5 | |
---|
15 | 6 | #include <linux/slab.h> |
---|
.. | .. |
---|
32 | 23 | LIST_HEAD(cfg802154_rdev_list); |
---|
33 | 24 | int cfg802154_rdev_list_generation; |
---|
34 | 25 | |
---|
35 | | -static int wpan_phy_match(struct device *dev, const void *data) |
---|
36 | | -{ |
---|
37 | | - return !strcmp(dev_name(dev), (const char *)data); |
---|
38 | | -} |
---|
39 | | - |
---|
40 | 26 | struct wpan_phy *wpan_phy_find(const char *str) |
---|
41 | 27 | { |
---|
42 | 28 | struct device *dev; |
---|
.. | .. |
---|
44 | 30 | if (WARN_ON(!str)) |
---|
45 | 31 | return NULL; |
---|
46 | 32 | |
---|
47 | | - dev = class_find_device(&wpan_phy_class, NULL, str, wpan_phy_match); |
---|
| 33 | + dev = class_find_device_by_name(&wpan_phy_class, str); |
---|
48 | 34 | if (!dev) |
---|
49 | 35 | return NULL; |
---|
50 | 36 | |
---|