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

@ -285,7 +285,7 @@ decl_subsys(power,NULL,NULL);
* proper enumerated value, and initiates a suspend transition.
*/
static ssize_t state_show(struct subsystem * subsys, char * buf)
static ssize_t state_show(struct kset *kset, char *buf)
{
int i;
char * s = buf;
@ -298,7 +298,7 @@ static ssize_t state_show(struct subsystem * subsys, char * buf)
return (s - buf);
}
static ssize_t state_store(struct subsystem * subsys, const char * buf, size_t n)
static ssize_t state_store(struct kset *kset, const char *buf, size_t n)
{
suspend_state_t state = PM_SUSPEND_STANDBY;
const char * const *s;
@ -325,13 +325,13 @@ power_attr(state);
#ifdef CONFIG_PM_TRACE
int pm_trace_enabled;
static ssize_t pm_trace_show(struct subsystem * subsys, char * buf)
static ssize_t pm_trace_show(struct kset *kset, char *buf)
{
return sprintf(buf, "%d\n", pm_trace_enabled);
}
static ssize_t
pm_trace_store(struct subsystem * subsys, const char * buf, size_t n)
pm_trace_store(struct kset *kset, const char *buf, size_t n)
{
int val;
@ -365,7 +365,7 @@ static int __init pm_init(void)
{
int error = subsystem_register(&power_subsys);
if (!error)
error = sysfs_create_group(&power_subsys.kset.kobj,&attr_group);
error = sysfs_create_group(&power_subsys.kobj,&attr_group);
return error;
}