From: Jia-Ju Bai Date: Fri, 27 Jul 2018 08:45:35 +0000 (+0800) Subject: atmel: Replace mdelay() with msleep() in probe_atmel_card() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5685bee313e9e8577faebcb349706e299f486db5;p=openwrt%2Fstaging%2Fblogic.git atmel: Replace mdelay() with msleep() in probe_atmel_card() probe_atmel_card() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/atmel/atmel.c b/drivers/net/wireless/atmel/atmel.c index f4f56f461b61..74538085cfb7 100644 --- a/drivers/net/wireless/atmel/atmel.c +++ b/drivers/net/wireless/atmel/atmel.c @@ -3677,7 +3677,7 @@ static int probe_atmel_card(struct net_device *dev) atmel_write16(dev, GCR, 0x0060); atmel_write16(dev, GCR, 0x0040); - mdelay(500); + msleep(500); if (atmel_read16(dev, MR2) == 0) { /* No stored firmware so load a small stub which just