Re: [RFC] Device class rework [0/5]

From: Greg KH (greg@kroah.com)
Date: Wed Apr 23 2003 - 11:00:40 EST


On Wed, Apr 23, 2003 at 08:54:04AM +0100, Shaheed R. Haque wrote:
>
> Hi Greg,
>
> I support the intent of this patch, but would it not be a better idea to rename
> the struct something like "device_class"? Rationale:

Ok, if I do that, and that was what I originally did, then we end up
with:
        struct device_class;
        struct device_class_device;
        struct device_class_interface;

Um, I don't think "struct device_class_device" is going to be
acceptable...

So I talked to a lot of people, explaining what the structures were, and
what they did, and in the end everyone agreed that dropping the
beginning "device_" is probably the best.

Well, not everyone agreed, but they couldn't come up with a better name,
so I took that as agreement :)

> 2. The word "class" is too generic and conveys no sense that is is to do with
> devices.

In a way, it is generic. It doesn't have to refer to a device (if the
pointer to struct device is NULL, then you don't get the "device"
symlink for free, that's it.) So we can now move block "devices", which
includes partitions, into this model, and also network "devices" if we
want too. Oh, how about filesystems, they also fit nicely into this
model, and aren't really a "device" at all...

> 3. I know that C++ is never going to make it into the kernel, but...

I know, I'm a stinker, but I honestly couldn't think of a better name,
and am open to ideas from everyone else.

And, I like the way my editor highlights the code, "struct class"...

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:37 EST