Skip to content

Commit 6631173

Browse files
Bartosz Golaszewskidavem330
authored andcommitted
net: phy: aquantia: rename and export aqr107_wait_reset_complete()
This function is quite generic in this driver and not limited to aqr107. We will use it outside its current compilation unit soon so rename it and declare it in the header. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 40ab9e0 commit 6631173

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/net/phy/aquantia/aquantia.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,6 @@ int aqr_phy_led_hw_control_set(struct phy_device *phydev, u8 index,
201201
int aqr_phy_led_active_low_set(struct phy_device *phydev, int index, bool enable);
202202
int aqr_phy_led_polarity_set(struct phy_device *phydev, int index,
203203
unsigned long modes);
204+
int aqr_wait_reset_complete(struct phy_device *phydev);
205+
204206
#endif /* AQUANTIA_H */

drivers/net/phy/aquantia/aquantia_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static int aqr107_set_tunable(struct phy_device *phydev,
441441
* The chip also provides a "reset completed" bit, but it's cleared after
442442
* read. Therefore function would time out if called again.
443443
*/
444-
static int aqr107_wait_reset_complete(struct phy_device *phydev)
444+
int aqr_wait_reset_complete(struct phy_device *phydev)
445445
{
446446
int val;
447447

@@ -494,7 +494,7 @@ static int aqr107_config_init(struct phy_device *phydev)
494494
WARN(phydev->interface == PHY_INTERFACE_MODE_XGMII,
495495
"Your devicetree is out of date, please update it. The AQR107 family doesn't support XGMII, maybe you mean USXGMII.\n");
496496

497-
ret = aqr107_wait_reset_complete(phydev);
497+
ret = aqr_wait_reset_complete(phydev);
498498
if (!ret)
499499
aqr107_chip_info(phydev);
500500

@@ -522,7 +522,7 @@ static int aqcs109_config_init(struct phy_device *phydev)
522522
phydev->interface != PHY_INTERFACE_MODE_2500BASEX)
523523
return -ENODEV;
524524

525-
ret = aqr107_wait_reset_complete(phydev);
525+
ret = aqr_wait_reset_complete(phydev);
526526
if (!ret)
527527
aqr107_chip_info(phydev);
528528

0 commit comments

Comments
 (0)