any history to class.txt's "devclass_attribute"?
Robert P. J. Day
rpjday at crashcourse.ca
Tue Oct 16 11:17:06 EDT 2012
currently writing an extensive tutorial for all of kobjects and
ktypes and sysfs and attributes and so on, so i'm perusing the stuff
under Documentation/driver-model, and i read this in "class.txt":
... snip ...
Exporting Attributes
~~~~~~~~~~~~~~~~~~~~
struct devclass_attribute {
struct attribute attr;
ssize_t (*show)(struct device_class *, char * buf, size_t count, loff_t off);
ssize_t (*store)(struct device_class *, const char * buf, size_t count, loff_t off);
};
Class drivers can export attributes using the DEVCLASS_ATTR macro that works
similarly to the DEVICE_ATTR macro for devices. For example, a definition
like this:
static DEVCLASS_ATTR(debug,0644,show_debug,store_debug);
is equivalent to declaring:
static devclass_attribute devclass_attr_debug;
... etc etc ...
until now, i'd never heard of a "devclass_attribute", and "git log"
certainly doesn't appear to explain how it came to be. anyone know
what the story is behind "devclass_attribute"? methinks it can be
tossed from the current Documentation. thoughts?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the Kernelnewbies
mailing list