realtek: phy: remove unneeded usage of genphy_loopback()

Kernel does

  if (phydev->drv->set_loopback)
    ret = phydev->drv->set_loopback(phydev, enable, speed);
  else
    ret = genphy_loopback(phydev, enable, speed);

So no need to explicitly set genphy_loopback() in phy_driver. Drop
references to let kernel do its work.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18782
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Markus Stockhausen 2025-05-11 14:44:26 -04:00 committed by Robert Marko
parent 01d5026239
commit 70f10e2210

View file

@ -3963,7 +3963,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.write_page = rtl821x_write_page,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
},
{
.match_phy_device = rtl8214fc_match_phy_device,
@ -3990,7 +3989,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.write_page = rtl821x_write_page,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
.set_eee = rtl8218b_set_eee,
.get_eee = rtl8218b_get_eee,
},
@ -4003,7 +4001,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.write_page = rtl821x_write_page,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
.set_eee = rtl8218d_set_eee,
.get_eee = rtl8218d_get_eee,
},
@ -4013,7 +4010,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.features = PHY_GBIT_FEATURES,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
.read_status = rtl8226_read_status,
@ -4027,7 +4023,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.features = PHY_GBIT_FEATURES,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
.read_status = rtl8226_read_status,
@ -4044,7 +4039,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.write_page = rtl821x_write_page,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
.set_eee = rtl8218b_set_eee,
.get_eee = rtl8218b_get_eee,
},
@ -4057,7 +4051,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.write_page = rtl821x_write_page,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
.read_status = rtl8380_read_status,
},
{
@ -4069,7 +4062,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.write_page = rtl821x_write_page,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
.read_status = rtl8393_read_status,
},
{
@ -4081,7 +4073,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.probe = rtl8390_serdes_probe,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
},
{
PHY_ID_MATCH_MODEL(PHY_ID_RTL9300_I),
@ -4092,7 +4083,6 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.probe = rtl9300_serdes_probe,
.suspend = genphy_suspend,
.resume = genphy_resume,
.set_loopback = genphy_loopback,
.read_status = rtl9300_read_status,
},
};