cpuidle/coupled: Add sanity check for safe_state_index
authorXunlei Pang <pang.xunlei@linaro.org>
Mon, 31 Aug 2015 03:34:05 +0000 (11:34 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 3 Sep 2015 01:05:47 +0000 (03:05 +0200)
commitabceaa9cded5f059f8c3b3b6f32730084fe5e39f
tree8f4cfa6f48e5ed6b6eee71ba4d2b7c334a705ba9
parent4c1ed5a6079078699128064664913ae7b079648f
cpuidle/coupled: Add sanity check for safe_state_index

Since we are using cpuidle_driver::safe_state_index directly as the
target state index, it is better to add the sanity check at the point
of registering the driver.

Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/coupled.c
drivers/cpuidle/cpuidle.h
drivers/cpuidle/driver.c