Re: ktypes vs. devices classes (struct class)

Greg KH <[email protected]>
Newsgroups gmane.linux.kernel.kernelnewbies
Message-ID <2023093017-overdraft-umbrella-9ad9@gregkh>
On Sat, Sep 30, 2023 at 02:12:41AM +0200, Richard wrote:
> Hi all,
> 
> Why do we have ktypes (struct kobj_type) AND device classes (struct class)?

Because they are two totally different things.

> Don't they serve the same purpose (more or less) and it would be simpler,
> clearer and more KISS to only have one? Is this a historically grown thing
> or by design?

Look closer.  Tell me what "struct class" is for vs. what "struct
kobj_type" is for and see if they both could be used for the same thing?

When we implemented them, we didn't think so but maybe something has
changed to now allow this?  If so, great, please send us patches to do
so!

thanks,

greg k-h
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.