• Viresh Kumar's avatar
    cpufreq: governors: Fix CPUFREQ_GOV_POLICY_{INIT|EXIT} notifiers · a97c98ad
    Viresh Kumar authored
    There are two types of INIT/EXIT activities that we need to do for
    governors:
     - Done only once per governor (doesn't depend how many instances of
       the governor there are). eg: cpufreq_register_notifier() for
       conservative governor.
     - Done per governor instance, eg: sysfs_{create|remove}_group().
    
    There were some corner cases where current code isn't able to handle
    them separately and so failing for some test cases.
    
    We use two separate variables now for keeping track of above two
    requirements.
     - governor->initialized for first one
     - dbs_data->usage_count for per governor instance
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    a97c98ad
cpufreq_governor.c 11.1 KB