Commit cb51aeec authored by Ulf Hansson's avatar Ulf Hansson Committed by Rafael J. Wysocki
Browse files

cpuidle: dt: Clarify a comment and simplify code in dt_init_idle_driver()



The drv->state_count is assigned the total number of available states, so
let's make that clear.

Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ee3c2c8a
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -211,11 +211,8 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
	of_node_put(cpu_node);
	of_node_put(cpu_node);
	if (err)
	if (err)
		return err;
		return err;
	/*

	 * Update the driver state count only if some valid DT idle states
	/* Set the number of total supported idle states. */
	 * were detected
	 */
	if (i)
	drv->state_count = state_idx;
	drv->state_count = state_idx;


	/*
	/*