remove "struct subsystem" as it is no longer needed

We need to work on cleaning up the relationship between kobjects, ksets and
ktypes.  The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.

Thanks to Kay for fixing the bugs in this patch.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman
2007-04-13 13:15:19 -07:00
parent 2609e7b9be
commit 823bccfc40
46 changed files with 231 additions and 292 deletions

View File

@ -13,8 +13,7 @@
#include "sysfs.h"
#define to_subsys(k) container_of(k,struct subsystem,kset.kobj)
#define to_sattr(a) container_of(a,struct subsys_attribute,attr)
#define to_sattr(a) container_of(a,struct subsys_attribute, attr)
/*
* Subsystem file operations.
@ -24,12 +23,12 @@
static ssize_t
subsys_attr_show(struct kobject * kobj, struct attribute * attr, char * page)
{
struct subsystem * s = to_subsys(kobj);
struct kset *kset = to_kset(kobj);
struct subsys_attribute * sattr = to_sattr(attr);
ssize_t ret = -EIO;
if (sattr->show)
ret = sattr->show(s,page);
ret = sattr->show(kset, page);
return ret;
}
@ -37,12 +36,12 @@ static ssize_t
subsys_attr_store(struct kobject * kobj, struct attribute * attr,
const char * page, size_t count)
{
struct subsystem * s = to_subsys(kobj);
struct kset *kset = to_kset(kobj);
struct subsys_attribute * sattr = to_sattr(attr);
ssize_t ret = -EIO;
if (sattr->store)
ret = sattr->store(s,page,count);
ret = sattr->store(kset, page, count);
return ret;
}