]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: phy: fixed_phy: switch to using fwnode_gpiod_get_index
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 3 Jan 2020 01:03:20 +0000 (17:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Jan 2020 22:27:01 +0000 (14:27 -0800)
gpiod_get_from_of_node() is being retired in favor of
[devm_]fwnode_gpiod_get_index(), that behaves similar to
[devm_]gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.

Let's switch this driver over.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/fixed_phy.c

index 4190f9ed5313d60c40890cb31f6ce2c94d456e7f..4a3d34f40cb9f7844f3d05a767ff7deb43e9e540 100644 (file)
@@ -210,8 +210,8 @@ static struct gpio_desc *fixed_phy_get_gpiod(struct device_node *np)
         * Linux device associated with it, we simply have obtain
         * the GPIO descriptor from the device tree like this.
         */
-       gpiod = gpiod_get_from_of_node(fixed_link_node, "link-gpios", 0,
-                                      GPIOD_IN, "mdio");
+       gpiod = fwnode_gpiod_get_index(of_fwnode_handle(fixed_link_node),
+                                      "link", 0, GPIOD_IN, "mdio");
        if (IS_ERR(gpiod) && PTR_ERR(gpiod) != -EPROBE_DEFER) {
                if (PTR_ERR(gpiod) != -ENOENT)
                        pr_err("error getting GPIO for fixed link %pOF, proceed without\n",