static Ecore_Timer *unlock_timer;
static struct timespec unlock_timer_start_st;
static struct timespec unlock_timer_end_st;
-static struct pmqos_cpu unlock_timer_owner = {"NULL", 0};
+static struct pmqos_cpu unlock_timer_owner = {"", 0};
int set_pmqos(const char *name, int val)
{
register_notifier(DEVICE_NOTIFIER_BOOTING_DONE, booting_done, NULL);
}
+static void pmqos_free(void)
+{
+ /* Assign 0 to static variables */
+ memset(&unlock_timer_start_st, 0, sizeof(struct timespec));
+ memset(&unlock_timer_end_st, 0, sizeof(struct timespec));
+ memset(&unlock_timer_owner, 0, sizeof(struct pmqos_cpu));
+
+ /* Clean up pmqos_head */
+ if (pmqos_head) {
+ DD_LIST_FREE_LIST_FULL(pmqos_head, free);
+ pmqos_head = NULL;
+ }
+
+ /* Clean up unlock_timer */
+ if (unlock_timer) {
+ ecore_timer_del(unlock_timer);
+ unlock_timer = NULL;
+ }
+}
+
static void pmqos_exit(void *data)
{
unregister_notifier(DEVICE_NOTIFIER_BOOTING_DONE, booting_done);
+ pmqos_free();
}
static const struct device_ops pmqos_device_ops = {