diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2022-02-25 12:24:03 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-25 14:00:29 +0100 |
commit | 0803a85a6f236f648b80584bc02b86b092f43d5a (patch) | |
tree | 65ad6b87d543eeec94f0febd6922f747da8b60bc /drivers/staging/wfx | |
parent | 1de8eec7c339700e266e9768258eb2e9625a0622 (diff) | |
download | linux-0803a85a6f236f648b80584bc02b86b092f43d5a.tar.bz2 |
staging: wfx: prefer to wait for an event instead to sleep
When possible it is better to wait for an explicit event instead of wait
an arbitrary amount of time.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220225112405.355599-9-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx')
-rw-r--r-- | drivers/staging/wfx/hif_tx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 0b1ed12c0e83..ae3cc5919dcd 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -72,8 +72,8 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request, wfx_bh_request_tx(wdev); if (no_reply) { - /* Chip won't reply. Give enough time to the wq to send the buffer. */ - msleep(100); + /* Chip won't reply. Ensure the wq has send the buffer before to continue. */ + flush_workqueue(system_highpri_wq); ret = 0; goto end; } |