Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbdLXKOF (ORCPT ); Sun, 24 Dec 2017 05:14:05 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:42618 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbdLXKOD (ORCPT ); Sun, 24 Dec 2017 05:14:03 -0500 X-Google-Smtp-Source: ACJfBotIXInsINmn2PqUzHkgig3c5fPQMoTRxy4kvmlT6oqWAieDuluGZ60qaOVurfx6TGzg50guwg== From: Jia-Ju Bai To: gregkh@linuxfoundation.org, christophe.jaillet@wanadoo.fr, singhalsimran0@gmail.com, szekelyszilv@gmail.com, gs051095@gmail.com, elia.f.geretto@gmail.com, robsonde@gmail.com, shreeya.patel23498@gmail.com, keescook@chromium.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] staging: rtl8192u: Replace mdelay with msleep in rtl8192_usb_probe Date: Sun, 24 Dec 2017 18:16:55 +0800 Message-Id: <1514110615-20342-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 805 Lines: 25 rtl8192_usb_probe is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with msleep, to avoid busy wait. Signed-off-by: Jia-Ju Bai --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 09f66b3..3c300f7 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -4998,7 +4998,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf, kfree(priv->pFirmware); priv->pFirmware = NULL; rtl8192_usb_deleteendpoints(dev); - mdelay(10); + msleep(10); free_ieee80211(dev); RT_TRACE(COMP_ERR, "wlan driver load failed\n"); -- 1.7.9.5