Commit 648e7f59 authored by Emil Dahl Juhl's avatar Emil Dahl Juhl Committed by Greg Kroah-Hartman
Browse files

tools/lib/thermal: Fix sampling handler context ptr



[ Upstream commit fcd54cf4 ]

The sampling handler, provided by the user alongside a void* context,
was invoked with an internal structure instead of the user context.

Correct the invocation of the sampling handler to pass the user context
pointer instead.

Note that the approach taken is similar to that in events.c, and will
reduce the chances of this mistake happening if additional sampling
callbacks are added.

Fixes: 47c4b0de ("tools/lib/thermal: Add a thermal library")
Signed-off-by: default avatarEmil Dahl Juhl <emdj@bang-olufsen.dk>
Link: https://lore.kernel.org/r/20241015171826.170154-1-emdj@bang-olufsen.dk


Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 42a26e97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment