Skip to contentSkip to conversation

ahci_sunxi: Use msleep instead of mdelay

PATCH New Hans de Goede 2 participants 2 messages Feb 23, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ahci_sunxi: Use msleep instead of mdelay

ahci_sunxi_phy_init is called from the probe and resume code paths, and sleeping is safe in both, so use msleep instead of mdelay.

---
 drivers/ata/ahci_sunxi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/ata/ahci_sunxi.c +3 -3
index 001f7dfc..d1bf3f7 100644
@@ -90,7 +90,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base)
 
 	/* This magic is from the original code */
 	writel(0, reg_base + AHCI_RWCR);
-	mdelay(5);
+	msleep(5);
 
 	sunxi_setbits(reg_base + AHCI_PHYCS1R, BIT(19));
 	sunxi_clrsetbits(reg_base + AHCI_PHYCS0R,
@@ -105,7 +105,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base)
 			 (0x7 << 20), (0x3 << 20));
 	sunxi_clrsetbits(reg_base + AHCI_PHYCS2R,
 			 (0x1f << 5), (0x19 << 5));
-	mdelay(5);
+	msleep(5);
 
 	sunxi_setbits(reg_base + AHCI_PHYCS0R, (0x1 << 19));
 
@@ -137,7 +137,7 @@ static int ahci_sunxi_phy_init(struct device *dev, void __iomem *reg_base)
 		udelay(1);
 	} while (1);
 
-	mdelay(15);
+	msleep(15);
 
 	writel(0x7, reg_base + AHCI_RWCR);
 
Signature · 1 line
1.9.0
Applied
#1 lore raw

PATCH 1/1 ahci_sunxi: Use msleep instead of mdelay

Quoted 4 lines · Hans de Goede

ahci_sunxi_phy_init is called from the probe and resume code paths, and sleeping is safe in both, so use msleep instead of mdelay.

Applied to libata/for-3.15. Thanks.

Signature · 1 line
tejun