powerHAL: Hikey: Fix compilation warning
It's reporting the compilation warning as below:
device/linaro/hikey/power/power_hikey.c:447:32: warning: unused variable 'hikey' [-Wunused-variable]
struct hikey_power_module *hikey = container_of(module,
This commit removes unused variable 'hikey' and add mark '__unused' for
parameter 'module'to dismiss the compilation warning.
Change-Id: I86ca979278dde7c959e9dc398def5078c8a59c5c
Signed-off-by: Leo Yan <leo.yan@linaro.org>
diff --git a/power/power_hikey.c b/power/power_hikey.c
index 2bcd296..34264d8 100644
--- a/power/power_hikey.c
+++ b/power/power_hikey.c
@@ -442,10 +442,9 @@
pthread_mutex_unlock(&hikey->lock);
}
-static void set_feature(struct power_module *module, feature_t feature, int state)
+static void set_feature(struct power_module __unused *module,
+ feature_t feature, int state)
{
- struct hikey_power_module *hikey = container_of(module,
- struct hikey_power_module, base);
switch (feature) {
default:
ALOGW("Error setting the feature %d and state %d, it doesn't exist\n",