lkml.org 
[lkml]   [2023]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v1 0/2] driver core/thermal: Fail registration of thermal object when thermal_class is not registered
Date
Hi All,

If thermal_class is not registered, the whole thermal framework is basically
unusable, because the governors are not there and its sysfs interface is not
present.

In that case it doesn't make sense to register thermal zones and cooling
devices, because they cannot be used as expected anyway, so make it possible
to fail the registration of these things if the registration of thermal_class
has failed.

To that end, make sure that the private pointer of a class is NULL when that
class is not registered with the driver core (patch [1/2]).

Next, make the thermal framework check the value of the thermal_class' private
pointer against NULL and fail the registration of thermal zones and cooling
devices when it is NULL (patch [2/2]).

Thanks!



\
 
 \ /
  Last update: 2023-03-26 23:49    [W:0.712 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site