linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] driver core/thermal: Fail registration of thermal object when thermal_class is not registered
@ 2023-01-20 19:45 Rafael J. Wysocki
  2023-01-20 19:46 ` [PATCH v1 1/2] driver core: class: Clear private pointer on registration failures Rafael J. Wysocki
  2023-01-20 19:48 ` [PATCH v1 2/2] thermal: Fail object registration if thermal class is not registered Rafael J. Wysocki
  0 siblings, 2 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2023-01-20 19:45 UTC (permalink / raw)
  To: Linux PM, Greg Kroah-Hartman
  Cc: LKML, Daniel Lezcano, Srinivas Pandruvada, Zhang Rui

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!




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-24 17:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 19:45 [PATCH v1 0/2] driver core/thermal: Fail registration of thermal object when thermal_class is not registered Rafael J. Wysocki
2023-01-20 19:46 ` [PATCH v1 1/2] driver core: class: Clear private pointer on registration failures Rafael J. Wysocki
2023-01-20 22:43   ` Daniel Lezcano
2023-01-20 19:48 ` [PATCH v1 2/2] thermal: Fail object registration if thermal class is not registered Rafael J. Wysocki
2023-01-20 22:43   ` Daniel Lezcano
2023-01-21  7:40   ` Greg Kroah-Hartman
2023-01-23 20:16     ` Rafael J. Wysocki
2023-01-24  6:03       ` Greg Kroah-Hartman
2023-01-24 13:57         ` Rafael J. Wysocki
2023-01-24 17:03           ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).