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: bu21029_ts - 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/bu21029_ts.c
··· 416 416 struct bu21029_ts_data *bu21029 = i2c_get_clientdata(i2c); 417 417 418 418 if (!device_may_wakeup(dev)) { 419 - mutex_lock(&bu21029->in_dev->mutex); 419 + guard(mutex)(&bu21029->in_dev->mutex); 420 + 420 421 if (input_device_enabled(bu21029->in_dev)) 421 422 bu21029_stop_chip(bu21029->in_dev); 422 - mutex_unlock(&bu21029->in_dev->mutex); 423 423 } 424 424 425 425 return 0; ··· 431 431 struct bu21029_ts_data *bu21029 = i2c_get_clientdata(i2c); 432 432 433 433 if (!device_may_wakeup(dev)) { 434 - mutex_lock(&bu21029->in_dev->mutex); 434 + guard(mutex)(&bu21029->in_dev->mutex); 435 + 435 436 if (input_device_enabled(bu21029->in_dev)) 436 437 bu21029_start_chip(bu21029->in_dev); 437 - mutex_unlock(&bu21029->in_dev->mutex); 438 438 } 439 439 440 440 return 0;