diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2021-05-05 14:17:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-10 11:19:40 +0200 |
commit | 4ab4ca2015eaeb16bbc6f2d8bd11384e2e52abd5 (patch) | |
tree | 6c0954583ed6fa843ad52a0562110d59a90961c3 /drivers/staging/mt7621-pci | |
parent | 726eb31628d484b86ecd17eb6404be2f6b7b420a (diff) |
staging: mt7621-pci: replace mdelay with msleep
There are two mdelay calls in driver code located in
'mt7621_pcie_reset_assert' and 'mt7621_pcie_reset_rc_deassert'
functions. Both of them are not called in an interrupt handler
nor holding any spinlock. Hence, the function mdelay in them
can be replaced with msleep, to reduce busy wait.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-6-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/mt7621-pci')
-rw-r--r-- | drivers/staging/mt7621-pci/pci-mt7621.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 296f50fb3571..40bb2e8a1177 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -441,7 +441,7 @@ static void mt7621_pcie_reset_assert(struct mt7621_pcie *pcie) mt7621_rst_gpio_pcie_assert(port); } - mdelay(PERST_DELAY_MS); + msleep(PERST_DELAY_MS); } static void mt7621_pcie_reset_rc_deassert(struct mt7621_pcie *pcie) @@ -459,7 +459,7 @@ static void mt7621_pcie_reset_ep_deassert(struct mt7621_pcie *pcie) list_for_each_entry(port, &pcie->ports, list) mt7621_rst_gpio_pcie_deassert(port); - mdelay(PERST_DELAY_MS); + msleep(PERST_DELAY_MS); } static void mt7621_pcie_init_ports(struct mt7621_pcie *pcie) |