diff mbox series

[net-next,4/5] r8152: rename r8153_phy_status to r8153_phy_status_wait

Message ID 20201103192226.2455-5-kabel@kernel.org
State Changes Requested
Delegated to: David Miller
Headers show
Series r8152 changes | expand

Checks

Context Check Description
jkicinski/cover_letter success Link
jkicinski/fixes_present success Link
jkicinski/patch_count success Link
jkicinski/tree_selection success Clearly marked for net-next
jkicinski/subject_prefix success Link
jkicinski/source_inline success Was 0 now: 0
jkicinski/verify_signedoff success Link
jkicinski/module_param success Was 0 now: 0
jkicinski/build_32bit success Errors and warnings before: 8 this patch: 8
jkicinski/kdoc success Errors and warnings before: 8 this patch: 8
jkicinski/verify_fixes success Link
jkicinski/checkpatch warning WARNING: From:/Signed-off-by: email name mismatch: 'From: "Marek Behún" <kabel@kernel.org>' != 'Signed-off-by: Marek Behún <kabel@kernel.org>'
jkicinski/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
jkicinski/header_inline success Link
jkicinski/stable success Stable not CCed

Commit Message

Marek Behún Nov. 3, 2020, 7:22 p.m. UTC
The idea behind r8153_phy_status function is to wait till status is of
desired value or (if desired value is zero) to wait till status if of
non-zero value. Rename this function to r8153_phy_status_wait.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/net/usb/r8152.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 905859309db4..1a427061da8e 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -3198,7 +3198,7 @@  static void r8153b_green_en(struct r8152 *tp, bool enable)
 	tp->ups_info.green = enable;
 }
 
-static u16 r8153_phy_status(struct r8152 *tp, u16 desired)
+static u16 r8153_phy_status_wait(struct r8152 *tp, u16 desired)
 {
 	u16 data;
 	int i;
@@ -3249,7 +3249,7 @@  static void r8153b_ups_en(struct r8152 *tp, bool enable)
 		ocp_data &= ~PCUT_STATUS;
 		usb_ocp_write_word(tp, USB_MISC_0, ocp_data);
 
-		data = r8153_phy_status(tp, 0);
+		data = r8153_phy_status_wait(tp, 0);
 
 		switch (data) {
 		case PHY_STAT_PWRDN:
@@ -3262,7 +3262,7 @@  static void r8153b_ups_en(struct r8152 *tp, bool enable)
 			data |= BMCR_RESET;
 			r8152_mdio_write(tp, MII_BMCR, data);
 
-			data = r8153_phy_status(tp, PHY_STAT_LAN_ON);
+			data = r8153_phy_status_wait(tp, PHY_STAT_LAN_ON);
 			fallthrough;
 
 		default:
@@ -5397,7 +5397,7 @@  static void r8153_init(struct r8152 *tp)
 			break;
 	}
 
-	data = r8153_phy_status(tp, 0);
+	data = r8153_phy_status_wait(tp, 0);
 
 	if (tp->version == RTL_VER_03 || tp->version == RTL_VER_04 ||
 	    tp->version == RTL_VER_05)
@@ -5409,7 +5409,7 @@  static void r8153_init(struct r8152 *tp)
 		r8152_mdio_write(tp, MII_BMCR, data);
 	}
 
-	data = r8153_phy_status(tp, PHY_STAT_LAN_ON);
+	data = r8153_phy_status_wait(tp, PHY_STAT_LAN_ON);
 
 	r8153_u2p3en(tp, false);
 
@@ -5536,7 +5536,7 @@  static void r8153b_init(struct r8152 *tp)
 			break;
 	}
 
-	data = r8153_phy_status(tp, 0);
+	data = r8153_phy_status_wait(tp, 0);
 
 	data = r8152_mdio_read(tp, MII_BMCR);
 	if (data & BMCR_PDOWN) {
@@ -5544,7 +5544,7 @@  static void r8153b_init(struct r8152 *tp)
 		r8152_mdio_write(tp, MII_BMCR, data);
 	}
 
-	data = r8153_phy_status(tp, PHY_STAT_LAN_ON);
+	data = r8153_phy_status_wait(tp, PHY_STAT_LAN_ON);
 
 	r8153_u2p3en(tp, false);