Skip to contentSkip to conversation

net: mdio-gpio: Use device_is_compatible()

PATCH Applied Andy Shevchenko 3 participants 3 messages Apr 4, 2024 – Apr 8, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: mdio-gpio: Use device_is_compatible()

Replace open coded variant of device_is_compatible().

---
 drivers/net/mdio/mdio-gpio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/mdio/mdio-gpio.c +1 -2
index 778db310a28d..82088741debd 100644
@@ -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;
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
#2 lore raw
In reply to Andy Shevchenko
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 6 lines · On Thu, 4 Apr 2024 20:55:57 +0300 you wrote:

Replace open coded variant of device_is_compatible().

---
 drivers/net/mdio/mdio-gpio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
- [net-next,v1,1/1] net: mdio-gpio: Use device_is_compatible()

    https://git.kernel.org/netdev/net-next/c/9d56c248e503

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html