• Jean Delvare's avatar
    thermal: make THERMAL_HWMON implementation fully internal · 31f5396a
    Jean Delvare authored
    THERMAL_HWMON is implemented inside the thermal_sys driver and has no
    effect on drivers implementing thermal zones, so they shouldn't see
    anything related to it in <linux/thermal.h>.  Making the THERMAL_HWMON
    implementation fully internal has two advantages beyond the cleaner
    design:
    
    * This avoids rebuilding all thermal drivers if the THERMAL_HWMON
      implementation changes, or if CONFIG_THERMAL_HWMON gets enabled or
      disabled.
    
    * This avoids breaking the thermal kABI in these cases too, which should
      make distributions happy.
    
    The only drawback I can see is slightly higher memory fragmentation, as
    the number of kzalloc() calls will increase by one per thermal zone.  But
    I doubt it will be a problem in practice, as I've never seen a system with
    more than two thermal zones.
    Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
    Cc: Rene Herman <rene.herman@gmail.com>
    Acked-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    31f5396a
thermal_sys.c 35.7 KB