Messages in this thread | | | Date | Fri, 20 Jan 2023 23:43:58 +0100 | Subject | Re: [PATCH v1 2/2] thermal: Fail object registration if thermal class is not registered | From | Daniel Lezcano <> |
| |
On 20/01/2023 20:48, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > If thermal_class is not registered with the driver core, there is no way > to expose the interfaces used by the thermal control framework, so > prevent thermal zones and cooling devices from being registered in > that case by returning an error from object registration functions. > > For this purpose, introduce class_is_registered() that checks the > private pointer of the given class and returns 'false' if it is NULL, > which means that the class has not been registered, and use it in the > thermal framework. > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
| |