diff mbox series

[RFC,15/57] net: hisilicon: hnfs:Use bus_find_device_by_fwnode helper

Message ID 1559577023-558-16-git-send-email-suzuki.poulose@arm.com
State New
Headers show
Series [RFC,01/57] drivers: s390/cio: Use driver_for_each_device | expand

Commit Message

Suzuki K Poulose June 3, 2019, 3:49 p.m. UTC
Switch to using the bus_find_device_by_fwnode helper

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

-- 
2.7.4
diff mbox series

Patch

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
index 09c16d8..b801ab7 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
@@ -754,17 +754,11 @@  struct dsaf_misc_op *hns_misc_op_get(struct dsaf_device *dsaf_dev)
 	return (void *)misc_op;
 }
 
-static int hns_dsaf_dev_match(struct device *dev, void *fwnode)
-{
-	return dev->fwnode == fwnode;
-}
-
 struct
 platform_device *hns_dsaf_find_platform_device(struct fwnode_handle *fwnode)
 {
 	struct device *dev;
 
-	dev = bus_find_device(&platform_bus_type, NULL,
-			      fwnode, hns_dsaf_dev_match);
+	dev = bus_find_device_by_fwnode(&platform_bus_type, NULL, fwnode);
 	return dev ? to_platform_device(dev) : NULL;
 }