OSDN Git Service

net: phylink: switch to using fwnode_gpiod_get_index()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 3 Jan 2020 01:03:18 +0000 (17:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Jan 2020 22:27:01 +0000 (14:27 -0800)
Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use
the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but
works with arbitrary firmware node.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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/phylink.c

index ba9468c..3f7fa63 100644 (file)
@@ -186,8 +186,8 @@ static int phylink_parse_fixedlink(struct phylink *pl,
                        pl->link_config.pause |= MLO_PAUSE_ASYM;
 
                if (ret == 0) {
-                       desc = fwnode_get_named_gpiod(fixed_node, "link-gpios",
-                                                     0, GPIOD_IN, "?");
+                       desc = fwnode_gpiod_get_index(fixed_node, "link", 0,
+                                                     GPIOD_IN, "?");
 
                        if (!IS_ERR(desc))
                                pl->link_gpio = desc;