Re: [PATCH] thermal: change thermal_class to a const struct

"Rafael J. Wysocki (Intel)" <[email protected]>
Newsgroups org.kernel.vger.linux-pm,dev.linux.lists.driver-core,org.kernel.vger.linux-kernel
Message-ID <CAJZ5v0ge2Br_oAtCUfhxgk0G8NJv3106cCxxjwctN-bgVft7rQ@mail.gmail.com>
On Mon, Aug 24, 2026 at 6:56 PM Greg Kroah-Hartman
<[email protected]> wrote:
>
> On Mon, Aug 24, 2026 at 06:09:33PM +0200, Rafael J. Wysocki (Intel) wrote:
> > On Tue, Aug 11, 2026 at 8:17 AM Jori Koolstra <[email protected]> wrote:
> > >
> > > The class_create() call has been deprecated in favor of class_register()
> > > as the driver core now allows for a struct class to be in read-only
> > > memory. Change thermal_class to be a const struct class and drop the
> > > class_create() call.
> >
> > This has been deliberately changed the other way around not too long
> > ago, in commit
> >
> > 34f54003643e thermal/core: Allocate the thermal class dynamically
> >
> > and it was then argued that it would be better to allocate the class
> > dynamically.
> >
> > You seem to have a differing opinion.
> >
> > Is there any plan to remove class_create() from the kernel?  If there
> > isn't, I'd rather stop this back-and-forth dance and leave the code
> > as-is.
>
> Yes, class_create() is going away.

Fair enough.

> I didn't notice commit 34f54003643e, but that's the wrong thing to do here.
> We should just revert that instead.

OK, let me send a revert of it.

Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.