From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM <linux-pm@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH v1 2/2] thermal: Fail object registration if thermal class is not registered
Date: Fri, 20 Jan 2023 23:43:58 +0100 [thread overview]
Message-ID: <4c532a7b-d5b4-da5e-5703-c6f8ebfbc62b@linaro.org> (raw)
In-Reply-To: <4780418.GXAFRqVoOG@kreacher>
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
next prev parent reply other threads:[~2023-01-20 22:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4c532a7b-d5b4-da5e-5703-c6f8ebfbc62b@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).