]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle: rename function name "__cpuidle_register_driver", v2
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 21 Sep 2012 22:38:32 +0000 (00:38 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Fri, 21 Sep 2012 22:38:32 +0000 (00:38 +0200)
commit018a34d2bdecfb4ddf481d9c7efecdc7abf20dd4
treef236987a37c2ce04175d3e7c97b88e69ea955ff8
parentd4e3249b6e1e2e803c40c788fc2bc294e85bcec8
cpuidle: rename function name "__cpuidle_register_driver", v2

The function __cpuidle_register_driver name is confusing because it
suggests, conforming to the coding style of the kernel, it registers
the driver without taking a lock. Actually, it just fill the different
power field states with a decresing value if the power has not been
specified.

Clarify the purpose of the function by changing its name and
move the condition out of this function.

This patch fix nothing and does not change the behavior of the
function. It is just for the sake of clarity.

IHMO, reading in the code:

+       if (!drv->power_specified)
+               set_power_states(drv);

is much more explicit than:

-       __cpuidle_register_driver(drv);

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/cpuidle/driver.c