]> www.infradead.org Git - users/hch/configfs.git/commitdiff
net: mdio-gpio: Use device_is_compatible()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 4 Apr 2024 17:55:57 +0000 (20:55 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2024 10:05:09 +0000 (11:05 +0100)
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>
drivers/net/mdio/mdio-gpio.c

index 778db310a28d357dfdee2a53cef45dd2ad438a28..82088741debd9cdcec2ed2a44de874643310ef7d 100644 (file)
@@ -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;