From 2c7362fefad32e63ab6ed9e057ac133e64d76f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 19 Dec 2018 20:24:36 +0100 Subject: [PATCH] module/battery: no need to lock before we've signaled ready --- modules/battery/battery.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/battery/battery.c b/modules/battery/battery.c index baaf5da..5776d0c 100644 --- a/modules/battery/battery.c +++ b/modules/battery/battery.c @@ -143,8 +143,6 @@ run(struct module_run_context *ctx) int base_dir_fd = openat(pw_fd, m->battery, O_RDONLY); assert(base_dir_fd != -1); - mtx_lock(&ctx->module->lock); - { int fd = openat(base_dir_fd, "manufacturer", O_RDONLY); assert(fd != -1); @@ -182,8 +180,6 @@ run(struct module_run_context *ctx) m->battery, m->manufacturer, m->model, 100.0 * m->energy_full / energy_full_design); - mtx_unlock(&ctx->module->lock); - int status_fd = openat(base_dir_fd, "status", O_RDONLY); assert(status_fd != -1);