[PATCH net-next v1 1/1] net: mdio-gpio: Use device_is_compatible()
From: Andy Shevchenko
Date: Thu Apr 04 2024 - 13:56:14 EST
Replace open coded variant of device_is_compatible().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/net/mdio/mdio-gpio.c | 3 +--
1 file changed, 1 insertion(+), 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;
--
2.43.0.rc1.1.gbec44491f096