]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
r8169: use tp_to_dev instead of open code
authorJuhee Kang <claudiajkang@gmail.com>
Tue, 29 Nov 2022 16:12:44 +0000 (01:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:15 +0000 (11:08 +0100)
commite143a3c82d3329aedfeb5296cad2879c56e21eef
tree77d75037b3be186663ee76f79e1864c5e470257b
parent3a8f4e58e1ee707b4f46a1000b40b86ea3dd509c
r8169: use tp_to_dev instead of open code

[ Upstream commit 4b6c6065fca123d419afef005a696f51e6590470 ]

The open code is defined as a helper function(tp_to_dev) on r8169_main.c,
which the open code is &tp->pci_dev->dev. The helper function was added
in commit 1e1205b7d3e9 ("r8169: add helper tp_to_dev"). And then later,
commit f1e911d5d0df ("r8169: add basic phylib support") added
r8169_phylink_handler function but it didn't use the helper function.
Thus, tp_to_dev() replaces the open code. This patch doesn't change logic.

Signed-off-by: Juhee Kang <claudiajkang@gmail.com>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/20221129161244.5356-1-claudiajkang@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: 621735f59064 ("r8169: fix rare issue with broken rx after link-down on RTL8125")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/realtek/r8169_main.c