Michael Trimarchi wrote: > Protect the data using a mutex. Fix a race that can happen when > the user read from the sysfs and the worker execute in the middle.
Looks good, but I'd suggest to put the inner part of bq27000_battery_get_property into a separate function and have a small wrapper that does just the locking. This way, you can still just return (keeps the code simpler) and there's no risk of ever missing an unlock path. - Werner
