Input: atmel_mxt_ts - move completion to after config crc is updated
authorNick Dyer <nick.dyer@itdev.co.uk>
Fri, 27 Jul 2018 18:49:29 +0000 (11:49 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 Jul 2018 18:59:34 +0000 (11:59 -0700)
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/atmel_mxt_ts.c

index e32667d82d0f374735eb38178a2a14a8768675b1..3232af5dcf89460db7c06fa531d7f58b4b6f8132 100644 (file)
@@ -728,13 +728,13 @@ static void mxt_proc_t6_messages(struct mxt_data *data, u8 *msg)
        u8 status = msg[1];
        u32 crc = msg[2] | (msg[3] << 8) | (msg[4] << 16);
 
-       complete(&data->crc_completion);
-
        if (crc != data->config_crc) {
                data->config_crc = crc;
                dev_dbg(dev, "T6 Config Checksum: 0x%06X\n", crc);
        }
 
+       complete(&data->crc_completion);
+
        /* Detect reset */
        if (status & MXT_T6_STATUS_RESET)
                complete(&data->reset_completion);