From a685c6d023c77303ca8700f37bf06eb85ffbf06a Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 6 Jan 2015 21:09:11 +0530 Subject: [PATCH] cpufreq: stats: create sysfs group once we are ready Userspace is free to read value of any file from cpufreq/stats directory once they are created. __cpufreq_stats_create_table() is creating the sysfs files first and then allocating resources for them. Though it would be quite difficult to trigger the racy situation here, but for the sake of keeping sensible code lets create sysfs entries only after we are ready to go. This also does some makeup to the routine to make it look better. Reviewed-by: Prarit Bhargava Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-format-patch failed