forked from external/yambar
module/battery: no need to lock before we've signaled ready
This commit is contained in:
parent
3413232ed6
commit
2c7362fefa
1 changed files with 0 additions and 4 deletions
|
@ -143,8 +143,6 @@ run(struct module_run_context *ctx)
|
||||||
int base_dir_fd = openat(pw_fd, m->battery, O_RDONLY);
|
int base_dir_fd = openat(pw_fd, m->battery, O_RDONLY);
|
||||||
assert(base_dir_fd != -1);
|
assert(base_dir_fd != -1);
|
||||||
|
|
||||||
mtx_lock(&ctx->module->lock);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
int fd = openat(base_dir_fd, "manufacturer", O_RDONLY);
|
int fd = openat(base_dir_fd, "manufacturer", O_RDONLY);
|
||||||
assert(fd != -1);
|
assert(fd != -1);
|
||||||
|
@ -182,8 +180,6 @@ run(struct module_run_context *ctx)
|
||||||
m->battery, m->manufacturer, m->model,
|
m->battery, m->manufacturer, m->model,
|
||||||
100.0 * m->energy_full / energy_full_design);
|
100.0 * m->energy_full / energy_full_design);
|
||||||
|
|
||||||
mtx_unlock(&ctx->module->lock);
|
|
||||||
|
|
||||||
int status_fd = openat(base_dir_fd, "status", O_RDONLY);
|
int status_fd = openat(base_dir_fd, "status", O_RDONLY);
|
||||||
assert(status_fd != -1);
|
assert(status_fd != -1);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue