aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-11-02 08:47:53 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:18 -0500
commit23b5212cc7422f475b82124334b64277b5b43013 (patch)
tree15be8d1e0f9600d87d28244de865c60e80b3389c /include/linux/kobject.h
parent6dcec2511ff55b4abaca7ad3433011a7c04c2430 (diff)
Driver Core: add kobj_attribute handling
Add kobj_sysfs_ops to replace subsys_sysfs_ops. There is no need for special kset operations, we want to be able to use simple attribute operations at any kobject, not only ksets. The whole concept of any default sysfs attribute operations will go away with the upcoming removal of subsys_sysfs_ops. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index a6dd669cda9d..e694261de90f 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -126,6 +126,16 @@ struct kset_uevent_ops {
126 struct kobj_uevent_env *env); 126 struct kobj_uevent_env *env);
127}; 127};
128 128
129struct kobj_attribute {
130 struct attribute attr;
131 ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,
132 char *buf);
133 ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
134 const char *buf, size_t count);
135};
136
137extern struct sysfs_ops kobj_sysfs_ops;
138
129/** 139/**
130 * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. 140 * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem.
131 * 141 *