Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: ektf2127 - use guard notation when acquiring mutex

Guard notation simplifies code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+4 -4
+4 -4
drivers/input/touchscreen/ektf2127.c
··· 187 187 { 188 188 struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); 189 189 190 - mutex_lock(&ts->input->mutex); 190 + guard(mutex)(&ts->input->mutex); 191 + 191 192 if (input_device_enabled(ts->input)) 192 193 ektf2127_stop(ts->input); 193 - mutex_unlock(&ts->input->mutex); 194 194 195 195 return 0; 196 196 } ··· 199 199 { 200 200 struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); 201 201 202 - mutex_lock(&ts->input->mutex); 202 + guard(mutex)(&ts->input->mutex); 203 + 203 204 if (input_device_enabled(ts->input)) 204 205 ektf2127_start(ts->input); 205 - mutex_unlock(&ts->input->mutex); 206 206 207 207 return 0; 208 208 }