From: Tejun Heo Date: Tue, 25 Jun 2013 18:53:37 +0000 (-0700) Subject: cgroup: implement for_each_[builtin_]subsys() X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~44^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30159ec7a9db7f3c91e2b27e66389c49302efd5c;p=pandora-kernel.git cgroup: implement for_each_[builtin_]subsys() There are quite a few places where all loaded [builtin] subsys are iterated. Implement for_each_[builtin_]subsys() and replace manual iterations with those to simplify those places a bit. The new iterators automatically skip NULL subsystems. This shouldn't cause any functional difference. Iteration loops which scan all subsystems and then skipping modular ones explicitly are converted to use for_each_builtin_subsys(). While at it, reorder variable declarations and adjust whitespaces a bit in the affected functions. v2: Add lockdep_assert_held() in for_each_subsys() and add comments about synchronization as suggested by Li. Signed-off-by: Tejun Heo Acked-by: Li Zefan --- Reading git-diff-tree failed