From 77057f5a28c94d8ed1779b829d9ef0ad0a95db44 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Tue, 29 Oct 2002 23:15:24 -0800 Subject: driver model: convert devices to use kobjects and sysfs. - Define a device subsystem and register it on startup. - Fill it in with fields converted from driverfs-style fields. - Convert device_{create,remove}_file() to create files in sysfs. - Add default device attributes to device subsystem. - Make sure devices get proper kobject familial pointers and that the kobjects are registered. --- include/linux/sysfs.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'include/linux/sysfs.h') 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 *); -- cgit v1.2.3