]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/sysfs.h
per-task-delay-accounting: update taskstats for memory reclaim delay
[linux-2.6-omap-h63xx.git] / include / linux / sysfs.h
index b393bb44962430b71f34e52f7414cd2b9f1c9794..37fa24152bd810f7d9dd67b685e738179b5bfdf9 100644 (file)
@@ -3,6 +3,8 @@
  *
  * Copyright (c) 2001,2002 Patrick Mochel
  * Copyright (c) 2004 Silicon Graphics, Inc.
+ * Copyright (c) 2007 SUSE Linux Products GmbH
+ * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
  *
  * Please see Documentation/filesystems/sysfs.txt for more information.
  */
@@ -30,6 +32,8 @@ struct attribute {
 
 struct attribute_group {
        const char              *name;
+       mode_t                  (*is_visible)(struct kobject *,
+                                             struct attribute *, int);
        struct attribute        **attrs;
 };
 
@@ -87,8 +91,6 @@ int __must_check sysfs_move_dir(struct kobject *kobj,
 
 int __must_check sysfs_create_file(struct kobject *kobj,
                                   const struct attribute *attr);
-int __must_check sysfs_update_file(struct kobject *kobj,
-                                  const struct attribute *attr);
 int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr,
                                  mode_t mode);
 void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr);
@@ -99,10 +101,15 @@ void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr);
 
 int __must_check sysfs_create_link(struct kobject *kobj, struct kobject *target,
                                   const char *name);
+int __must_check sysfs_create_link_nowarn(struct kobject *kobj,
+                                         struct kobject *target,
+                                         const char *name);
 void sysfs_remove_link(struct kobject *kobj, const char *name);
 
 int __must_check sysfs_create_group(struct kobject *kobj,
                                    const struct attribute_group *grp);
+int sysfs_update_group(struct kobject *kobj,
+                      const struct attribute_group *grp);
 void sysfs_remove_group(struct kobject *kobj,
                        const struct attribute_group *grp);
 int sysfs_add_file_to_group(struct kobject *kobj,
@@ -129,7 +136,6 @@ static inline int sysfs_create_dir(struct kobject *kobj)
 
 static inline void sysfs_remove_dir(struct kobject *kobj)
 {
-       ;
 }
 
 static inline int sysfs_rename_dir(struct kobject *kobj, const char *new_name)
@@ -149,11 +155,6 @@ static inline int sysfs_create_file(struct kobject *kobj,
        return 0;
 }
 
-static inline int sysfs_update_file(struct kobject *kobj,
-                                   const struct attribute *attr)
-{
-       return 0;
-}
 static inline int sysfs_chmod_file(struct kobject *kobj,
                                   struct attribute *attr, mode_t mode)
 {
@@ -163,7 +164,6 @@ static inline int sysfs_chmod_file(struct kobject *kobj,
 static inline void sysfs_remove_file(struct kobject *kobj,
                                     const struct attribute *attr)
 {
-       ;
 }
 
 static inline int sysfs_create_bin_file(struct kobject *kobj,
@@ -172,10 +172,9 @@ static inline int sysfs_create_bin_file(struct kobject *kobj,
        return 0;
 }
 
-static inline int sysfs_remove_bin_file(struct kobject *kobj,
-                                       struct bin_attribute *attr)
+static inline void sysfs_remove_bin_file(struct kobject *kobj,
+                                        struct bin_attribute *attr)
 {
-       return 0;
 }
 
 static inline int sysfs_create_link(struct kobject *kobj,
@@ -184,9 +183,15 @@ static inline int sysfs_create_link(struct kobject *kobj,
        return 0;
 }
 
+static inline int sysfs_create_link_nowarn(struct kobject *kobj,
+                                          struct kobject *target,
+                                          const char *name)
+{
+       return 0;
+}
+
 static inline void sysfs_remove_link(struct kobject *kobj, const char *name)
 {
-       ;
 }
 
 static inline int sysfs_create_group(struct kobject *kobj,
@@ -195,10 +200,15 @@ static inline int sysfs_create_group(struct kobject *kobj,
        return 0;
 }
 
+static inline int sysfs_update_group(struct kobject *kobj,
+                               const struct attribute_group *grp)
+{
+       return 0;
+}
+
 static inline void sysfs_remove_group(struct kobject *kobj,
                                      const struct attribute_group *grp)
 {
-       ;
 }
 
 static inline int sysfs_add_file_to_group(struct kobject *kobj,