[PATCH 31/53] nfc: mrvl: Simplify a create*_workqueue() call
From: Bart Van Assche
Date: Sun Jun 30 2024 - 18:36:50 EST
Pass a format string to create*_workqueue2() instead of formatting the
workqueue name before create*_workqueue() is called.
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
drivers/nfc/nfcmrvl/fw_dnld.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/nfc/nfcmrvl/fw_dnld.c b/drivers/nfc/nfcmrvl/fw_dnld.c
index e83f65596a88..fc8d9466422d 100644
--- a/drivers/nfc/nfcmrvl/fw_dnld.c
+++ b/drivers/nfc/nfcmrvl/fw_dnld.c
@@ -442,12 +442,10 @@ static void fw_dnld_rx_work(struct work_struct *work)
int nfcmrvl_fw_dnld_init(struct nfcmrvl_private *priv)
{
- char name[32];
-
INIT_WORK(&priv->fw_dnld.rx_work, fw_dnld_rx_work);
- snprintf(name, sizeof(name), "%s_nfcmrvl_fw_dnld_rx_wq",
- dev_name(&priv->ndev->nfc_dev->dev));
- priv->fw_dnld.rx_wq = create_singlethread_workqueue(name);
+ priv->fw_dnld.rx_wq = create_singlethread_workqueue2(
+ "%s_nfcmrvl_fw_dnld_rx_wq",
+ dev_name(&priv->ndev->nfc_dev->dev));
if (!priv->fw_dnld.rx_wq)
return -ENOMEM;
skb_queue_head_init(&priv->fw_dnld.rx_q);