diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-04-04 20:55:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-08 11:05:09 +0100 |
commit | 9d56c248e5030d17ea9cd132634e86fdf0622d0e (patch) | |
tree | cad9a2d74b66786246ba350d1f0d65295d611a0b | |
parent | db77cdc69684890b37ff2bb9fb9e0be2ba4d6efe (diff) | |
download | linux-stable-9d56c248e5030d17ea9cd132634e86fdf0622d0e.tar.gz linux-stable-9d56c248e5030d17ea9cd132634e86fdf0622d0e.tar.bz2 linux-stable-9d56c248e5030d17ea9cd132634e86fdf0622d0e.zip |
net: mdio-gpio: Use device_is_compatible()
Replace open coded variant of device_is_compatible().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/mdio/mdio-gpio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/mdio/mdio-gpio.c b/drivers/net/mdio/mdio-gpio.c index 778db310a28d..82088741debd 100644 --- a/drivers/net/mdio/mdio-gpio.c +++ b/drivers/net/mdio/mdio-gpio.c @@ -132,8 +132,7 @@ static struct mii_bus *mdio_gpio_bus_init(struct device *dev, new_bus->phy_ignore_ta_mask = pdata->phy_ignore_ta_mask; } - if (dev->of_node && - of_device_is_compatible(dev->of_node, "microchip,mdio-smi0")) { + if (device_is_compatible(dev, "microchip,mdio-smi0")) { bitbang->ctrl.op_c22_read = 0; bitbang->ctrl.op_c22_write = 0; bitbang->ctrl.override_op_c22 = 1; |