Merge tag 'leds-for-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anasz...
[linux-2.6-block.git] / drivers / infiniband / hw / hns / hns_roce_hw_v1.c
index c07e387a07a38b88a02d175e6ddd889e13ef00bf..141205e763144901912a8146b0b35db13a378e91 100644 (file)
@@ -4501,19 +4501,13 @@ static const struct acpi_device_id hns_roce_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, hns_roce_acpi_match);
 
-static int hns_roce_node_match(struct device *dev, const void *fwnode)
-{
-       return dev->fwnode == fwnode;
-}
-
 static struct
 platform_device *hns_roce_find_pdev(struct fwnode_handle *fwnode)
 {
        struct device *dev;
 
        /* get the 'device' corresponding to the matching 'fwnode' */
-       dev = bus_find_device(&platform_bus_type, NULL,
-                             fwnode, hns_roce_node_match);
+       dev = bus_find_device_by_fwnode(&platform_bus_type, fwnode);
        /* get the platform device */
        return dev ? to_platform_device(dev) : NULL;
 }