Linux-WPAN Archive on lore.kernel.org
 help / color / Atom feed
* [RFC PATCH 34/57] drivers: ieee802154: Use class_find_device_by_name() helper
       [not found] <1559577023-558-1-git-send-email-suzuki.poulose@arm.com>
@ 2019-06-03 15:50 ` Suzuki K Poulose
  0 siblings, 0 replies; only message in thread
From: Suzuki K Poulose @ 2019-06-03 15:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: gregkh, rafael, suzuki.poulose, Alexander Aring, Stefan Schmidt,
	linux-wpan

Use the new class_find_device_by_name() helper.

Cc: Alexander Aring <alex.aring@gmail.com>
Cc: Stefan Schmidt <stefan@datenfreihafen.org>
Cc: linux-wpan@vger.kernel.org
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 net/ieee802154/core.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c
index 60b7ac5..26fe751 100644
--- a/net/ieee802154/core.c
+++ b/net/ieee802154/core.c
@@ -23,11 +23,6 @@
 LIST_HEAD(cfg802154_rdev_list);
 int cfg802154_rdev_list_generation;
 
-static int wpan_phy_match(struct device *dev, const void *data)
-{
-	return !strcmp(dev_name(dev), (const char *)data);
-}
-
 struct wpan_phy *wpan_phy_find(const char *str)
 {
 	struct device *dev;
@@ -35,7 +30,7 @@ struct wpan_phy *wpan_phy_find(const char *str)
 	if (WARN_ON(!str))
 		return NULL;
 
-	dev = class_find_device(&wpan_phy_class, NULL, str, wpan_phy_match);
+	dev = class_find_device_by_name(&wpan_phy_class, NULL, str);
 	if (!dev)
 		return NULL;
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1559577023-558-1-git-send-email-suzuki.poulose@arm.com>
2019-06-03 15:50 ` [RFC PATCH 34/57] drivers: ieee802154: Use class_find_device_by_name() helper Suzuki K Poulose

Linux-WPAN Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wpan/0 linux-wpan/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wpan linux-wpan/ https://lore.kernel.org/linux-wpan \
		linux-wpan@vger.kernel.org
	public-inbox-index linux-wpan

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wpan


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git