thermal: trip: Use READ_ONCE() for lockless access to trip properties
When accessing trip temperature and hysteresis without locking, it is
better to use READ_ONCE() to prevent compiler optimizations possibly
affecting the read from being applied.
Of course, for the READ_ONCE() to be effective, WRITE_ONCE() needs to
be used when updating their values.
Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing
Please register or sign in to comment