driver core/thermal: Fail registration of thermal object when thermal_class is not registered
Get series with b4
b4 am 5905717.lOV4Wx5bFT@kreacherVersions newest first
- v1 Latest2 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | driver core: class: Clear private pointer on registration failuresdrivers/ | +11 | 1 reply | |
| 2/2 | thermal: Fail object registration if thermal class is not registereddrivers/ include/ | +11 | 6 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Daniel Lezcano |
|---|---|
| 1/2 | A-b |
| 2/2 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 0/2] driver core/thermal: Fail registration of thermal object when thermal_class is not registered
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!