thermal: gov_fair_share: Fix dependency on trip points ordering
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Jan 2024 17:55:13 +0000 (18:55 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Jan 2024 14:37:56 +0000 (15:37 +0100)
commitf2675e588f928f7f3051765563a18f90332bd57b
tree8c5c6847bd0cf09fde824562f72b3dda4f5dca7f
parentc6a783be82c893c6f124a5853bef2edeaf26dadf
thermal: gov_fair_share: Fix dependency on trip points ordering

The computation in the fair share governor's get_trip_level() function
currently works under the assumption that the temperature ordering of
trips[] in a thermal zone is ascending, which need not be the case.

However, get_trip_level() can be made work regardless of whether or not
the trips table is ordered by temperature in any way, so change it
accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/gov_fair_share.c