diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/device.h | 6 | ||||
| -rw-r--r-- | include/linux/driverfs_fs.h | 7 | ||||
| -rw-r--r-- | include/linux/kobject.h | 4 | ||||
| -rw-r--r-- | include/linux/sysfs.h | 12 |
4 files changed, 16 insertions, 13 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 2e0948e96d68..5ce759266658 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -29,6 +29,7 @@ #include <linux/list.h> #include <linux/sched.h> #include <linux/driverfs_fs.h> +#include <linux/kobject.h> #define DEVICE_NAME_SIZE 80 #define DEVICE_ID_SIZE 32 @@ -65,6 +66,9 @@ struct bus_type { atomic_t refcount; u32 present; + struct subsystem subsys; + struct subsystem drvsubsys; + struct subsystem devsubsys; struct list_head node; struct list_head devices; struct list_head drivers; @@ -119,6 +123,7 @@ struct device_driver { atomic_t refcount; u32 present; + struct kobject kobj; struct list_head bus_list; struct list_head class_list; struct list_head devices; @@ -275,6 +280,7 @@ struct device { struct list_head intf_list; struct device * parent; + struct kobject kobj; char name[DEVICE_NAME_SIZE]; /* descriptive ascii string */ char bus_id[BUS_ID_SIZE]; /* position on parent bus */ diff --git a/include/linux/driverfs_fs.h b/include/linux/driverfs_fs.h index b4270e947a1e..af7dc715855d 100644 --- a/include/linux/driverfs_fs.h +++ b/include/linux/driverfs_fs.h @@ -26,6 +26,8 @@ #ifndef _DRIVER_FS_H_ #define _DRIVER_FS_H_ +#include <linux/sysfs.h> + struct driver_dir_entry; struct attribute; @@ -43,11 +45,6 @@ struct driver_dir_entry { struct driverfs_ops * ops; }; -struct attribute { - char * name; - mode_t mode; -}; - extern int driverfs_create_dir(struct driver_dir_entry *, struct driver_dir_entry *); diff --git a/include/linux/kobject.h b/include/linux/kobject.h index d2f0629a6189..40de16d0a227 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -12,8 +12,10 @@ #include <linux/rwsem.h> #include <asm/atomic.h> +#define KOBJ_NAME_LEN 16 + struct kobject { - char name[16]; + char name[KOBJ_NAME_LEN]; atomic_t refcount; struct list_head entry; struct kobject * parent; diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 7a46c9f0c308..29c3eb8d2c9e 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -9,20 +9,18 @@ #ifndef _SYSFS_H_ #define _SYSFS_H_ -struct driver_dir_entry; -struct attribute; struct kobject; -struct sysfs_ops { - ssize_t (*show)(struct kobject *, struct attribute *,char *, size_t, loff_t); - ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t, loff_t); -}; - struct attribute { char * name; mode_t mode; }; +struct sysfs_ops { + ssize_t (*show)(struct kobject *, struct attribute *,char *, size_t, loff_t); + ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t, loff_t); +}; + extern int sysfs_create_dir(struct kobject *); |
