@@ -1186,7 +1186,7 @@ static void mt_touch_report(struct hid_device *hid,
11861186 int contact_count = -1 ;
11871187
11881188 /* sticky fingers release in progress, abort */
1189- if (test_and_set_bit (MT_IO_FLAGS_RUNNING , & td -> mt_io_flags ))
1189+ if (test_and_set_bit_lock (MT_IO_FLAGS_RUNNING , & td -> mt_io_flags ))
11901190 return ;
11911191
11921192 scantime = * app -> scantime ;
@@ -1267,7 +1267,7 @@ static void mt_touch_report(struct hid_device *hid,
12671267 del_timer (& td -> release_timer );
12681268 }
12691269
1270- clear_bit (MT_IO_FLAGS_RUNNING , & td -> mt_io_flags );
1270+ clear_bit_unlock (MT_IO_FLAGS_RUNNING , & td -> mt_io_flags );
12711271}
12721272
12731273static int mt_touch_input_configured (struct hid_device * hdev ,
@@ -1699,11 +1699,11 @@ static void mt_expired_timeout(struct timer_list *t)
16991699 * An input report came in just before we release the sticky fingers,
17001700 * it will take care of the sticky fingers.
17011701 */
1702- if (test_and_set_bit (MT_IO_FLAGS_RUNNING , & td -> mt_io_flags ))
1702+ if (test_and_set_bit_lock (MT_IO_FLAGS_RUNNING , & td -> mt_io_flags ))
17031703 return ;
17041704 if (test_bit (MT_IO_FLAGS_PENDING_SLOTS , & td -> mt_io_flags ))
17051705 mt_release_contacts (hdev );
1706- clear_bit (MT_IO_FLAGS_RUNNING , & td -> mt_io_flags );
1706+ clear_bit_unlock (MT_IO_FLAGS_RUNNING , & td -> mt_io_flags );
17071707}
17081708
17091709static int mt_probe (struct hid_device * hdev , const struct hid_device_id * id )
0 commit comments