Skip to content
Unverified Commit cd7e36ab authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Mark Brown
Browse files

regulator: Fix useless O^2 complexity in suspend/resume



regulator_pm_ops with regulator_suspend and regulator_resume functions are
assigned to every regulator device registered in the system, so there is no
need to iterate over all again in them. Replace class_for_each_device()
construction with direct operation on the rdev embedded in the given
regulator device. This saves a lots of useless operations in suspend and
resume paths.

Fixes: f7efad10: regulator: add PM suspend and resume hooks
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent beb5a17f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment