thermal: intel: int340x: Improve int340x_thermal_set_trip_temp()
Instead of using snprintf() to populate the ACPI object name in int340x_thermal_set_trip_temp(), use an appropriate initializer and make the function fail if its trip argument is greater than 9, because ACPI object names can only be 4 characters long and it does not make sense to even try to evaluate objects with longer names (that argument is guaranteed to be non-negative, because it comes from the thermal code that will not pass negative trip numbers to zone callbacks). Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Tested-by: NZhang Rui <rui.zhang@intel.com> Reviewed-by: NZhang Rui <rui.zhang@intel.com>
Showing
想要评论请 注册 或 登录