net: dsa: lan9303: Replace msleep(1) with usleep_range()
authorEgil Hjelmeland <privat@egil-hjelmeland.no>
Mon, 6 Nov 2017 11:42:03 +0000 (12:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Nov 2017 04:29:06 +0000 (13:29 +0900)
Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range()

Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lan9303-core.c

index c4afc8f1a66dfdc1b76bf53a6dfeb5950703ec1c..70ecd18a5e7dd3a40be0e050ecfa5f19c05c6fda 100644 (file)
@@ -284,7 +284,7 @@ static int lan9303_indirect_phy_wait_for_completion(struct lan9303 *chip)
                }
                if (!(reg & LAN9303_PMI_ACCESS_MII_BUSY))
                        return 0;
-               msleep(1);
+               usleep_range(1000, 2000);
        }
 
        return -EIO;
@@ -376,7 +376,7 @@ static int lan9303_switch_wait_for_completion(struct lan9303 *chip)
                }
                if (!(reg & LAN9303_SWITCH_CSR_CMD_BUSY))
                        return 0;
-               msleep(1);
+               usleep_range(1000, 2000);
        }
 
        return -EIO;