staging: wfx: change the field chip_frozen into a boolean
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Mon, 27 Apr 2020 13:40:16 +0000 (15:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Apr 2020 12:14:26 +0000 (14:14 +0200)
The field chip_frozen is declared as an integer, but it is only used as
a boolean. So, convert it into a boolean.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200427134031.323403-3-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/hif_rx.c
drivers/staging/wfx/hif_tx.c
drivers/staging/wfx/queue.c
drivers/staging/wfx/wfx.h

index b8d5702..b56138f 100644 (file)
@@ -316,7 +316,7 @@ static int hif_exception_indication(struct wfx_dev *wdev,
 
        dev_err(wdev->dev, "firmware exception\n");
        print_hex_dump_bytes("Dump: ", DUMP_PREFIX_NONE, buf, len);
-       wdev->chip_frozen = 1;
+       wdev->chip_frozen = true;
 
        return -1;
 }
index 17721cf..e8f3c5f 100644 (file)
@@ -91,7 +91,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply,
        if (!ret) {
                dev_err(wdev->dev, "chip did not answer\n");
                wfx_pending_dump_old_frames(wdev, 3000);
-               wdev->chip_frozen = 1;
+               wdev->chip_frozen = true;
                reinit_completion(&wdev->hif_cmd.done);
                ret = -ETIMEDOUT;
        } else {
index 2f6f9fa..0c799ce 100644 (file)
@@ -52,7 +52,7 @@ void wfx_tx_flush(struct wfx_dev *wdev)
                         wdev->hif.tx_buffers_used);
                wfx_pending_dump_old_frames(wdev, 3000);
                // FIXME: drop pending frames here
-               wdev->chip_frozen = 1;
+               wdev->chip_frozen = true;
        }
        mutex_unlock(&wdev->hif_cmd.lock);
        wfx_tx_unlock(wdev);
index 706e95c..77bb6c6 100644 (file)
@@ -45,7 +45,7 @@ struct wfx_dev {
        struct hif_ind_startup  hw_caps;
        struct wfx_hif          hif;
        struct sl_context       sl;
-       int                     chip_frozen;
+       bool                    chip_frozen;
        struct mutex            conf_mutex;
 
        struct wfx_hif_cmd      hif_cmd;