From: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH v2] staging: rtl8712: usb_intf: Remove flush_scheduled_work()
Date: Sun, 13 Mar 2016 12:55:16 +0530 [thread overview]
Message-ID: <20160313072516.GA22863@Karyakshetra> (raw)
flush_scheduled_work() flushes out all work items in system_wq.
Since one doesn't know what could be running there, flushing work items
individually is preferred.
Since there are finite number of work items to be flushed,(viz
pwrpriv->SetPSModeWorkItem,pwrpriv->SetPSModeWorkItem,pLed->BlinkWorkItem)
instead of flushing system_wq, each work item is separately flushed.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
Changes in v2:
-Fixed typo in commit message.
drivers/staging/rtl8712/usb_intf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c
index c1a0ca49..32c5798 100644
--- a/drivers/staging/rtl8712/usb_intf.c
+++ b/drivers/staging/rtl8712/usb_intf.c
@@ -627,7 +627,9 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
if (drvpriv.drv_registered)
padapter->bSurpriseRemoved = true;
unregister_netdev(pnetdev); /* will call netdev_close() */
- flush_scheduled_work();
+ cancel_delayed_work(&pwrpriv->SetPSModeWorkItem);
+ cancel_delayed_work(&pwrpriv->rpwm_workitem);
+ cancel_delayed_work(&pLed->BlinkWorkItem);
udelay(1);
/* Stop driver mlme relation timer */
r8712_stop_drv_timers(padapter);
--
2.1.4
next reply other threads:[~2016-03-13 7:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-13 7:25 Bhaktipriya Shridhar [this message]
2016-03-21 20:50 ` [Outreachy kernel] [PATCH v2] staging: rtl8712: usb_intf: Remove flush_scheduled_work() Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160313072516.GA22863@Karyakshetra \
--to=bhaktipriya96@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.