sdio: add new function for RAW (Read after Write) operation
[safe/jmp/linux-2.6] / include / linux / sysfs.h
index 1885d21..f2694eb 100644 (file)
@@ -87,17 +87,18 @@ struct attribute_group {
 
 #define attr_name(_attr) (_attr).attr.name
 
+struct file;
 struct vm_area_struct;
 
 struct bin_attribute {
        struct attribute        attr;
        size_t                  size;
        void                    *private;
-       ssize_t (*read)(struct kobject *, struct bin_attribute *,
+       ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *,
                        char *, loff_t, size_t);
-       ssize_t (*write)(struct kobject *, struct bin_attribute *,
+       ssize_t (*write)(struct file *,struct kobject *, struct bin_attribute *,
                         char *, loff_t, size_t);
-       int (*mmap)(struct kobject *, struct bin_attribute *attr,
+       int (*mmap)(struct file *, struct kobject *, struct bin_attribute *attr,
                    struct vm_area_struct *vma);
 };
 
@@ -155,6 +156,9 @@ void sysfs_remove_link(struct kobject *kobj, const char *name);
 int sysfs_rename_link(struct kobject *kobj, struct kobject *target,
                        const char *old_name, const char *new_name);
 
+void sysfs_delete_link(struct kobject *dir, struct kobject *targ,
+                       const char *name);
+
 int __must_check sysfs_create_group(struct kobject *kobj,
                                    const struct attribute_group *grp);
 int sysfs_update_group(struct kobject *kobj,
@@ -175,6 +179,7 @@ struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd);
 void sysfs_put(struct sysfs_dirent *sd);
 void sysfs_printk_last_file(void);
 
+/* Called to clear a ns tag when it is no longer valid */
 void sysfs_exit_ns(enum kobj_ns_type type, const void *tag);
 
 int __must_check sysfs_init(void);
@@ -269,6 +274,11 @@ static inline int sysfs_rename_link(struct kobject *k, struct kobject *t,
        return 0;
 }
 
+static inline void sysfs_delete_link(struct kobject *k, struct kobject *t,
+                                    const char *name)
+{
+}
+
 static inline int sysfs_create_group(struct kobject *kobj,
                                     const struct attribute_group *grp)
 {
@@ -319,7 +329,7 @@ static inline void sysfs_put(struct sysfs_dirent *sd)
 {
 }
 
-static inline void sysfs_exit_ns(enum kobj_ns_type type, const void *tag)
+static inline void sysfs_exit_ns(int type, const void *tag)
 {
 }