net: miiphybb: Use container_of() in bb_miiphy_getbus()
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 22 Feb 2025 20:33:28 +0000 (21:33 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 26 Feb 2025 17:26:57 +0000 (18:26 +0100)
commited4ab7c5e0e9e85c369bb6f7f2f5316788102e2c
treeafa67bbf08d41af61a7a0b5771a2b965d9cf644b
parentcbb69c2fafcc7c7e9b2336a658128cb394d8d3e4
net: miiphybb: Use container_of() in bb_miiphy_getbus()

Replace the name based look up in bb_miiphy_getbus() with trivial
container_of() call. This works because the struct bb_miiphy_bus
always embeds the matching struct mii_dev . This also makes the
code much simpler and more efficient.

Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
drivers/net/phy/miiphybb.c