cpuquiet: Properly return the first registered governor
Sai Charan Gurrappadi [Fri, 22 Jun 2012 22:42:59 +0000 (15:42 -0700)]
Change-Id: I8a21a15d5cf8e4c91a166810387b5d8f1dd7cdb6
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/111284
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

drivers/cpuquiet/governor.c

index 1446b9e..7895fcc 100644 (file)
@@ -28,7 +28,8 @@ struct cpuquiet_governor *cpuquiet_curr_governor;
 struct cpuquiet_governor *cpuquiet_get_first_governor(void)
 {
        if (!list_empty(&cpuquiet_governors))
-               return list_entry(&cpuquiet_governors, struct cpuquiet_governor,
+               return list_entry(cpuquiet_governors.next,
+                                       struct cpuquiet_governor,
                                        governor_list);
        else
                return NULL;