Skip to content

Commit

Permalink
net: phylink: switch to using fwnode_gpiod_get_index()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov authored and David S. Miller committed Jan 5, 2020
1 parent aa1d54c commit b605c9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/phy/phylink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b605c9a

Please sign in to comment.