Messages in this thread | | | Date | Tue, 11 Jan 2005 23:08:02 -0800 | From | Greg KH <> | Subject | Re: [PATCH] Add attribute container to the generic device model |
| |
On Tue, Jan 11, 2005 at 11:06:10PM -0600, James Bottomley wrote: > Attribute containers allows a single device to belong to an arbitrary > number of classes, each with an arbitrary number of attributes.
But classes could always have an arbitrary number of attributes, right?
> This will be used as the basis for a generic transport class, but I did > it like this in case anyone found the abstraction useful.
Hm, I like the idea, but we already allow devices belonging to arbitrary number of classes (through class_device) today. What makes this different?
And how does this change, if at all, sysfs representations of devices that use this?
Some minor comments about the code:
> +EXPORT_SYMBOL(attribute_container_classdev_to_container);
Can these all be EXPORT_SYMBOL_GPL? It's your choice, as you wrote the code, but we're trying to keep the driver model stuff all GPL explicit, as there's no way someone can say it's a "derived work" from long ago that's using these new functions.
> +/** > + * attribute_container_add_device - see if any container is interested in dev > + * > + * @dev: device to add attributes to > + * @fn: function to trigger addition of class device. > + * > + * If no fn is provided, the code will simply register the class > + * device via class_device_add.
You mean the class_device of the "container", right?
The code looks sane, if not a bit confusing as there's no user of it :)
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/
| |