[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d702f364c3bd1b31858ef5bd6d714867@piie.net>
Date: Wed, 02 Dec 2020 22:32:48 +0000
From: "Peter Kästle" <peter@...e.net>
To: "Daniel Lezcano" <daniel.lezcano@...aro.org>
Cc: "Hans de Goede" <hdegoede@...hat.com>,
"Mark Gross" <mgross@...ux.intel.com>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] platform/x86/drivers/acerhdf: Check the interval
value when it is set
2. Dezember 2020 23:22, "Daniel Lezcano" <daniel.lezcano@...aro.org> schrieb:
> Currently the code checks the interval value when the temperature is
> read which is bad for two reasons:
>
> - checking and setting the interval in the get_temp callback is
> inaccurate and awful, that can be done when changing the value.
>
> - Changing the thermal zone structure internals is an abuse of the
> exported structure, moreover no lock is taken here.
>
> The goal of this patch is to solve the first item by using the 'set'
> function called when changing the interval. The check is done there
> and removed from the get_temp function. If the thermal zone was not
> initialized yet, the interval is not updated in this case as that will
> happen in the init function when registering the thermal zone device.
>
> I don't have any hardware to test the changes.
Thanks for this patch, I'll test it in upcoming days.
Powered by blists - more mailing lists