You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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:
@@ -72,12 +72,12 @@ static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE];
|
||||
|
||||
static unsigned short enable_dyn_sleep = 1;
|
||||
|
||||
static ssize_t omap_pm_sleep_while_idle_show(struct subsystem * subsys, char *buf)
|
||||
static ssize_t omap_pm_sleep_while_idle_show(struct kset *kset, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%hu\n", enable_dyn_sleep);
|
||||
}
|
||||
|
||||
static ssize_t omap_pm_sleep_while_idle_store(struct subsystem * subsys,
|
||||
static ssize_t omap_pm_sleep_while_idle_store(struct kset *kset,
|
||||
const char * buf,
|
||||
size_t n)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ static struct subsys_attribute sleep_while_idle_attr = {
|
||||
.store = omap_pm_sleep_while_idle_store,
|
||||
};
|
||||
|
||||
extern struct subsystem power_subsys;
|
||||
extern struct kset power_subsys;
|
||||
static void (*omap_sram_idle)(void) = NULL;
|
||||
static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <asm/iseries/hv_call_xm.h>
|
||||
#include <asm/iseries/iommu.h>
|
||||
|
||||
extern struct subsystem devices_subsys; /* needed for vio_find_name() */
|
||||
extern struct kset devices_subsys; /* needed for vio_find_name() */
|
||||
|
||||
static struct vio_dev vio_bus_device = { /* fake "parent" device */
|
||||
.name = vio_bus_device.dev.bus_id,
|
||||
@@ -427,7 +427,7 @@ static struct vio_dev *vio_find_name(const char *kobj_name)
|
||||
{
|
||||
struct kobject *found;
|
||||
|
||||
found = kset_find_obj(&devices_subsys.kset, kobj_name);
|
||||
found = kset_find_obj(&devices_subsys, kobj_name);
|
||||
if (!found)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
unsigned long rtas_poweron_auto; /* default and normal state is 0 */
|
||||
|
||||
static ssize_t auto_poweron_show(struct subsystem *subsys, char *buf)
|
||||
static ssize_t auto_poweron_show(struct kset *kset, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%lu\n", rtas_poweron_auto);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
auto_poweron_store(struct subsystem *subsys, const char *buf, size_t n)
|
||||
auto_poweron_store(struct kset *kset, const char *buf, size_t n)
|
||||
{
|
||||
int ret;
|
||||
unsigned long ups_restart;
|
||||
@@ -72,12 +72,12 @@ 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;
|
||||
}
|
||||
core_initcall(pm_init);
|
||||
#else
|
||||
extern struct subsystem power_subsys;
|
||||
extern struct kset power_subsys;
|
||||
|
||||
static int __init apo_pm_init(void)
|
||||
{
|
||||
|
||||
+16
-16
@@ -164,7 +164,7 @@ EXPORT_SYMBOL_GPL(diag308);
|
||||
/* SYSFS */
|
||||
|
||||
#define DEFINE_IPL_ATTR_RO(_prefix, _name, _format, _value) \
|
||||
static ssize_t sys_##_prefix##_##_name##_show(struct subsystem *subsys, \
|
||||
static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \
|
||||
char *page) \
|
||||
{ \
|
||||
return sprintf(page, _format, _value); \
|
||||
@@ -173,13 +173,13 @@ static struct subsys_attribute sys_##_prefix##_##_name##_attr = \
|
||||
__ATTR(_name, S_IRUGO, sys_##_prefix##_##_name##_show, NULL);
|
||||
|
||||
#define DEFINE_IPL_ATTR_RW(_prefix, _name, _fmt_out, _fmt_in, _value) \
|
||||
static ssize_t sys_##_prefix##_##_name##_show(struct subsystem *subsys, \
|
||||
static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \
|
||||
char *page) \
|
||||
{ \
|
||||
return sprintf(page, _fmt_out, \
|
||||
(unsigned long long) _value); \
|
||||
} \
|
||||
static ssize_t sys_##_prefix##_##_name##_store(struct subsystem *subsys,\
|
||||
static ssize_t sys_##_prefix##_##_name##_store(struct kset *kset, \
|
||||
const char *buf, size_t len) \
|
||||
{ \
|
||||
unsigned long long value; \
|
||||
@@ -194,12 +194,12 @@ static struct subsys_attribute sys_##_prefix##_##_name##_attr = \
|
||||
sys_##_prefix##_##_name##_store);
|
||||
|
||||
#define DEFINE_IPL_ATTR_STR_RW(_prefix, _name, _fmt_out, _fmt_in, _value)\
|
||||
static ssize_t sys_##_prefix##_##_name##_show(struct subsystem *subsys, \
|
||||
static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \
|
||||
char *page) \
|
||||
{ \
|
||||
return sprintf(page, _fmt_out, _value); \
|
||||
} \
|
||||
static ssize_t sys_##_prefix##_##_name##_store(struct subsystem *subsys,\
|
||||
static ssize_t sys_##_prefix##_##_name##_store(struct kset *kset, \
|
||||
const char *buf, size_t len) \
|
||||
{ \
|
||||
if (sscanf(buf, _fmt_in, _value) != 1) \
|
||||
@@ -272,14 +272,14 @@ void __init setup_ipl_info(void)
|
||||
struct ipl_info ipl_info;
|
||||
EXPORT_SYMBOL_GPL(ipl_info);
|
||||
|
||||
static ssize_t ipl_type_show(struct subsystem *subsys, char *page)
|
||||
static ssize_t ipl_type_show(struct kset *kset, char *page)
|
||||
{
|
||||
return sprintf(page, "%s\n", ipl_type_str(ipl_info.type));
|
||||
}
|
||||
|
||||
static struct subsys_attribute sys_ipl_type_attr = __ATTR_RO(ipl_type);
|
||||
|
||||
static ssize_t sys_ipl_device_show(struct subsystem *subsys, char *page)
|
||||
static ssize_t sys_ipl_device_show(struct kset *kset, char *page)
|
||||
{
|
||||
struct ipl_parameter_block *ipl = IPL_PARMBLOCK_START;
|
||||
|
||||
@@ -371,7 +371,7 @@ static struct attribute_group ipl_fcp_attr_group = {
|
||||
|
||||
/* CCW ipl device attributes */
|
||||
|
||||
static ssize_t ipl_ccw_loadparm_show(struct subsystem *subsys, char *page)
|
||||
static ssize_t ipl_ccw_loadparm_show(struct kset *kset, char *page)
|
||||
{
|
||||
char loadparm[LOADPARM_LEN + 1] = {};
|
||||
|
||||
@@ -469,7 +469,7 @@ static void reipl_get_ascii_loadparm(char *loadparm)
|
||||
strstrip(loadparm);
|
||||
}
|
||||
|
||||
static ssize_t reipl_ccw_loadparm_show(struct subsystem *subsys, char *page)
|
||||
static ssize_t reipl_ccw_loadparm_show(struct kset *kset, char *page)
|
||||
{
|
||||
char buf[LOADPARM_LEN + 1];
|
||||
|
||||
@@ -477,7 +477,7 @@ static ssize_t reipl_ccw_loadparm_show(struct subsystem *subsys, char *page)
|
||||
return sprintf(page, "%s\n", buf);
|
||||
}
|
||||
|
||||
static ssize_t reipl_ccw_loadparm_store(struct subsystem *subsys,
|
||||
static ssize_t reipl_ccw_loadparm_store(struct kset *kset,
|
||||
const char *buf, size_t len)
|
||||
{
|
||||
int i, lp_len;
|
||||
@@ -572,12 +572,12 @@ static int reipl_set_type(enum ipl_type type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t reipl_type_show(struct subsystem *subsys, char *page)
|
||||
static ssize_t reipl_type_show(struct kset *kset, char *page)
|
||||
{
|
||||
return sprintf(page, "%s\n", ipl_type_str(reipl_type));
|
||||
}
|
||||
|
||||
static ssize_t reipl_type_store(struct subsystem *subsys, const char *buf,
|
||||
static ssize_t reipl_type_store(struct kset *kset, const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
int rc = -EINVAL;
|
||||
@@ -665,12 +665,12 @@ static int dump_set_type(enum dump_type type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t dump_type_show(struct subsystem *subsys, char *page)
|
||||
static ssize_t dump_type_show(struct kset *kset, char *page)
|
||||
{
|
||||
return sprintf(page, "%s\n", dump_type_str(dump_type));
|
||||
}
|
||||
|
||||
static ssize_t dump_type_store(struct subsystem *subsys, const char *buf,
|
||||
static ssize_t dump_type_store(struct kset *kset, const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
int rc = -EINVAL;
|
||||
@@ -697,12 +697,12 @@ static decl_subsys(shutdown_actions, NULL, NULL);
|
||||
|
||||
/* on panic */
|
||||
|
||||
static ssize_t on_panic_show(struct subsystem *subsys, char *page)
|
||||
static ssize_t on_panic_show(struct kset *kset, char *page)
|
||||
{
|
||||
return sprintf(page, "%s\n", shutdown_action_str(on_panic_action));
|
||||
}
|
||||
|
||||
static ssize_t on_panic_store(struct subsystem *subsys, const char *buf,
|
||||
static ssize_t on_panic_store(struct kset *kset, const char *buf,
|
||||
size_t len)
|
||||
{
|
||||
if (strncmp(buf, SHUTDOWN_REIPL_STR, strlen(SHUTDOWN_REIPL_STR)) == 0)
|
||||
|
||||
+6
-6
@@ -17,7 +17,7 @@
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
struct subsystem block_subsys;
|
||||
struct kset block_subsys;
|
||||
static DEFINE_MUTEX(block_subsys_lock);
|
||||
|
||||
/*
|
||||
@@ -221,7 +221,7 @@ static void *part_start(struct seq_file *part, loff_t *pos)
|
||||
loff_t l = *pos;
|
||||
|
||||
mutex_lock(&block_subsys_lock);
|
||||
list_for_each(p, &block_subsys.kset.list)
|
||||
list_for_each(p, &block_subsys.list)
|
||||
if (!l--)
|
||||
return list_entry(p, struct gendisk, kobj.entry);
|
||||
return NULL;
|
||||
@@ -231,7 +231,7 @@ static void *part_next(struct seq_file *part, void *v, loff_t *pos)
|
||||
{
|
||||
struct list_head *p = ((struct gendisk *)v)->kobj.entry.next;
|
||||
++*pos;
|
||||
return p==&block_subsys.kset.list ? NULL :
|
||||
return p==&block_subsys.list ? NULL :
|
||||
list_entry(p, struct gendisk, kobj.entry);
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ static int show_partition(struct seq_file *part, void *v)
|
||||
int n;
|
||||
char buf[BDEVNAME_SIZE];
|
||||
|
||||
if (&sgp->kobj.entry == block_subsys.kset.list.next)
|
||||
if (&sgp->kobj.entry == block_subsys.list.next)
|
||||
seq_puts(part, "major minor #blocks name\n\n");
|
||||
|
||||
/* Don't show non-partitionable removeable devices or empty devices */
|
||||
@@ -565,7 +565,7 @@ static void *diskstats_start(struct seq_file *part, loff_t *pos)
|
||||
struct list_head *p;
|
||||
|
||||
mutex_lock(&block_subsys_lock);
|
||||
list_for_each(p, &block_subsys.kset.list)
|
||||
list_for_each(p, &block_subsys.list)
|
||||
if (!k--)
|
||||
return list_entry(p, struct gendisk, kobj.entry);
|
||||
return NULL;
|
||||
@@ -575,7 +575,7 @@ static void *diskstats_next(struct seq_file *part, void *v, loff_t *pos)
|
||||
{
|
||||
struct list_head *p = ((struct gendisk *)v)->kobj.entry.next;
|
||||
++*pos;
|
||||
return p==&block_subsys.kset.list ? NULL :
|
||||
return p==&block_subsys.list ? NULL :
|
||||
list_entry(p, struct gendisk, kobj.entry);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,3 +45,5 @@ struct class_device_attribute *to_class_dev_attr(struct attribute *_attr)
|
||||
extern char *make_class_name(const char *name, struct kobject *kobj);
|
||||
|
||||
extern void devres_release_all(struct device *dev);
|
||||
|
||||
extern struct kset devices_subsys;
|
||||
|
||||
+8
-8
@@ -17,7 +17,7 @@
|
||||
#include "power/power.h"
|
||||
|
||||
#define to_bus_attr(_attr) container_of(_attr, struct bus_attribute, attr)
|
||||
#define to_bus(obj) container_of(obj, struct bus_type, subsys.kset.kobj)
|
||||
#define to_bus(obj) container_of(obj, struct bus_type, subsys.kobj)
|
||||
|
||||
/*
|
||||
* sysfs bindings for drivers
|
||||
@@ -123,7 +123,7 @@ int bus_create_file(struct bus_type * bus, struct bus_attribute * attr)
|
||||
{
|
||||
int error;
|
||||
if (get_bus(bus)) {
|
||||
error = sysfs_create_file(&bus->subsys.kset.kobj, &attr->attr);
|
||||
error = sysfs_create_file(&bus->subsys.kobj, &attr->attr);
|
||||
put_bus(bus);
|
||||
} else
|
||||
error = -EINVAL;
|
||||
@@ -133,7 +133,7 @@ int bus_create_file(struct bus_type * bus, struct bus_attribute * attr)
|
||||
void bus_remove_file(struct bus_type * bus, struct bus_attribute * attr)
|
||||
{
|
||||
if (get_bus(bus)) {
|
||||
sysfs_remove_file(&bus->subsys.kset.kobj, &attr->attr);
|
||||
sysfs_remove_file(&bus->subsys.kobj, &attr->attr);
|
||||
put_bus(bus);
|
||||
}
|
||||
}
|
||||
@@ -397,7 +397,7 @@ static void device_remove_attrs(struct bus_type * bus, struct device * dev)
|
||||
static int make_deprecated_bus_links(struct device *dev)
|
||||
{
|
||||
return sysfs_create_link(&dev->kobj,
|
||||
&dev->bus->subsys.kset.kobj, "bus");
|
||||
&dev->bus->subsys.kobj, "bus");
|
||||
}
|
||||
|
||||
static void remove_deprecated_bus_links(struct device *dev)
|
||||
@@ -431,7 +431,7 @@ int bus_add_device(struct device * dev)
|
||||
if (error)
|
||||
goto out_id;
|
||||
error = sysfs_create_link(&dev->kobj,
|
||||
&dev->bus->subsys.kset.kobj, "subsystem");
|
||||
&dev->bus->subsys.kobj, "subsystem");
|
||||
if (error)
|
||||
goto out_subsys;
|
||||
error = make_deprecated_bus_links(dev);
|
||||
@@ -810,7 +810,7 @@ int bus_register(struct bus_type * bus)
|
||||
|
||||
BLOCKING_INIT_NOTIFIER_HEAD(&bus->bus_notifier);
|
||||
|
||||
retval = kobject_set_name(&bus->subsys.kset.kobj, "%s", bus->name);
|
||||
retval = kobject_set_name(&bus->subsys.kobj, "%s", bus->name);
|
||||
if (retval)
|
||||
goto out;
|
||||
|
||||
@@ -820,13 +820,13 @@ int bus_register(struct bus_type * bus)
|
||||
goto out;
|
||||
|
||||
kobject_set_name(&bus->devices.kobj, "devices");
|
||||
bus->devices.subsys = &bus->subsys;
|
||||
bus->devices.kobj.parent = &bus->subsys.kobj;
|
||||
retval = kset_register(&bus->devices);
|
||||
if (retval)
|
||||
goto bus_devices_fail;
|
||||
|
||||
kobject_set_name(&bus->drivers.kobj, "drivers");
|
||||
bus->drivers.subsys = &bus->subsys;
|
||||
bus->drivers.kobj.parent = &bus->subsys.kobj;
|
||||
bus->drivers.ktype = &ktype_driver;
|
||||
retval = kset_register(&bus->drivers);
|
||||
if (retval)
|
||||
|
||||
+8
-10
@@ -19,10 +19,8 @@
|
||||
#include <linux/slab.h>
|
||||
#include "base.h"
|
||||
|
||||
extern struct subsystem devices_subsys;
|
||||
|
||||
#define to_class_attr(_attr) container_of(_attr, struct class_attribute, attr)
|
||||
#define to_class(obj) container_of(obj, struct class, subsys.kset.kobj)
|
||||
#define to_class(obj) container_of(obj, struct class, subsys.kobj)
|
||||
|
||||
static ssize_t
|
||||
class_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
|
||||
@@ -80,7 +78,7 @@ int class_create_file(struct class * cls, const struct class_attribute * attr)
|
||||
{
|
||||
int error;
|
||||
if (cls) {
|
||||
error = sysfs_create_file(&cls->subsys.kset.kobj, &attr->attr);
|
||||
error = sysfs_create_file(&cls->subsys.kobj, &attr->attr);
|
||||
} else
|
||||
error = -EINVAL;
|
||||
return error;
|
||||
@@ -89,7 +87,7 @@ int class_create_file(struct class * cls, const struct class_attribute * attr)
|
||||
void class_remove_file(struct class * cls, const struct class_attribute * attr)
|
||||
{
|
||||
if (cls)
|
||||
sysfs_remove_file(&cls->subsys.kset.kobj, &attr->attr);
|
||||
sysfs_remove_file(&cls->subsys.kobj, &attr->attr);
|
||||
}
|
||||
|
||||
static struct class *class_get(struct class *cls)
|
||||
@@ -147,7 +145,7 @@ int class_register(struct class * cls)
|
||||
INIT_LIST_HEAD(&cls->interfaces);
|
||||
kset_init(&cls->class_dirs);
|
||||
init_MUTEX(&cls->sem);
|
||||
error = kobject_set_name(&cls->subsys.kset.kobj, "%s", cls->name);
|
||||
error = kobject_set_name(&cls->subsys.kobj, "%s", cls->name);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
@@ -611,7 +609,7 @@ int class_device_add(struct class_device *class_dev)
|
||||
if (parent_class_dev)
|
||||
class_dev->kobj.parent = &parent_class_dev->kobj;
|
||||
else
|
||||
class_dev->kobj.parent = &parent_class->subsys.kset.kobj;
|
||||
class_dev->kobj.parent = &parent_class->subsys.kobj;
|
||||
|
||||
error = kobject_add(&class_dev->kobj);
|
||||
if (error)
|
||||
@@ -619,7 +617,7 @@ int class_device_add(struct class_device *class_dev)
|
||||
|
||||
/* add the needed attributes to this device */
|
||||
error = sysfs_create_link(&class_dev->kobj,
|
||||
&parent_class->subsys.kset.kobj, "subsystem");
|
||||
&parent_class->subsys.kobj, "subsystem");
|
||||
if (error)
|
||||
goto out3;
|
||||
class_dev->uevent_attr.attr.name = "uevent";
|
||||
@@ -917,8 +915,8 @@ int __init classes_init(void)
|
||||
/* ick, this is ugly, the things we go through to keep from showing up
|
||||
* in sysfs... */
|
||||
subsystem_init(&class_obj_subsys);
|
||||
if (!class_obj_subsys.kset.subsys)
|
||||
class_obj_subsys.kset.subsys = &class_obj_subsys;
|
||||
if (!class_obj_subsys.kobj.parent)
|
||||
class_obj_subsys.kobj.parent = &class_obj_subsys.kobj;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -565,7 +565,7 @@ static struct kobject * get_device_parent(struct device *dev,
|
||||
/* Set the parent to the class, not the parent device */
|
||||
/* this keeps sysfs from having a symlink to make old udevs happy */
|
||||
if (dev->class)
|
||||
return &dev->class->subsys.kset.kobj;
|
||||
return &dev->class->subsys.kobj;
|
||||
else if (parent)
|
||||
return &parent->kobj;
|
||||
|
||||
@@ -577,7 +577,7 @@ static struct kobject *virtual_device_parent(struct device *dev)
|
||||
static struct kobject *virtual_dir = NULL;
|
||||
|
||||
if (!virtual_dir)
|
||||
virtual_dir = kobject_add_dir(&devices_subsys.kset.kobj, "virtual");
|
||||
virtual_dir = kobject_add_dir(&devices_subsys.kobj, "virtual");
|
||||
|
||||
return virtual_dir;
|
||||
}
|
||||
@@ -711,12 +711,12 @@ int device_add(struct device *dev)
|
||||
}
|
||||
|
||||
if (dev->class) {
|
||||
sysfs_create_link(&dev->kobj, &dev->class->subsys.kset.kobj,
|
||||
sysfs_create_link(&dev->kobj, &dev->class->subsys.kobj,
|
||||
"subsystem");
|
||||
/* If this is not a "fake" compatible device, then create the
|
||||
* symlink from the class to the device. */
|
||||
if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
|
||||
sysfs_create_link(&dev->class->subsys.kset.kobj,
|
||||
if (dev->kobj.parent != &dev->class->subsys.kobj)
|
||||
sysfs_create_link(&dev->class->subsys.kobj,
|
||||
&dev->kobj, dev->bus_id);
|
||||
if (parent) {
|
||||
sysfs_create_link(&dev->kobj, &dev->parent->kobj,
|
||||
@@ -774,8 +774,8 @@ int device_add(struct device *dev)
|
||||
sysfs_remove_link(&dev->kobj, "subsystem");
|
||||
/* If this is not a "fake" compatible device, remove the
|
||||
* symlink from the class to the device. */
|
||||
if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
|
||||
sysfs_remove_link(&dev->class->subsys.kset.kobj,
|
||||
if (dev->kobj.parent != &dev->class->subsys.kobj)
|
||||
sysfs_remove_link(&dev->class->subsys.kobj,
|
||||
dev->bus_id);
|
||||
if (parent) {
|
||||
#ifdef CONFIG_SYSFS_DEPRECATED
|
||||
@@ -875,8 +875,8 @@ void device_del(struct device * dev)
|
||||
sysfs_remove_link(&dev->kobj, "subsystem");
|
||||
/* If this is not a "fake" compatible device, remove the
|
||||
* symlink from the class to the device. */
|
||||
if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
|
||||
sysfs_remove_link(&dev->class->subsys.kset.kobj,
|
||||
if (dev->kobj.parent != &dev->class->subsys.kobj)
|
||||
sysfs_remove_link(&dev->class->subsys.kobj,
|
||||
dev->bus_id);
|
||||
if (parent) {
|
||||
#ifdef CONFIG_SYSFS_DEPRECATED
|
||||
@@ -1192,9 +1192,9 @@ int device_rename(struct device *dev, char *new_name)
|
||||
#endif
|
||||
|
||||
if (dev->class) {
|
||||
sysfs_remove_link(&dev->class->subsys.kset.kobj,
|
||||
sysfs_remove_link(&dev->class->subsys.kobj,
|
||||
old_symlink_name);
|
||||
sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj,
|
||||
sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
|
||||
dev->bus_id);
|
||||
}
|
||||
put_device(dev);
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
static decl_subsys(firmware, NULL, NULL);
|
||||
|
||||
int firmware_register(struct subsystem * s)
|
||||
int firmware_register(struct kset *s)
|
||||
{
|
||||
kset_set_kset_s(s, firmware_subsys);
|
||||
kobj_set_kset_s(s, firmware_subsys);
|
||||
return subsystem_register(s);
|
||||
}
|
||||
|
||||
void firmware_unregister(struct subsystem * s)
|
||||
void firmware_unregister(struct kset *s)
|
||||
{
|
||||
subsystem_unregister(s);
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
#define to_dev(node) container_of(node, struct device, kobj.entry)
|
||||
|
||||
extern struct subsystem devices_subsys;
|
||||
|
||||
|
||||
/**
|
||||
* We handle system devices differently - we suspend and shut them
|
||||
@@ -36,7 +34,7 @@ void device_shutdown(void)
|
||||
{
|
||||
struct device * dev, *devn;
|
||||
|
||||
list_for_each_entry_safe_reverse(dev, devn, &devices_subsys.kset.list,
|
||||
list_for_each_entry_safe_reverse(dev, devn, &devices_subsys.list,
|
||||
kobj.entry) {
|
||||
if (dev->bus && dev->bus->shutdown) {
|
||||
dev_dbg(dev, "shutdown\n");
|
||||
|
||||
+7
-7
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "base.h"
|
||||
|
||||
extern struct subsystem devices_subsys;
|
||||
extern struct kset devices_subsys;
|
||||
|
||||
#define to_sysdev(k) container_of(k, struct sys_device, kobj)
|
||||
#define to_sysdev_attr(a) container_of(a, struct sysdev_attribute, attr)
|
||||
@@ -138,7 +138,7 @@ int sysdev_class_register(struct sysdev_class * cls)
|
||||
pr_debug("Registering sysdev class '%s'\n",
|
||||
kobject_name(&cls->kset.kobj));
|
||||
INIT_LIST_HEAD(&cls->drivers);
|
||||
cls->kset.subsys = &system_subsys;
|
||||
cls->kset.kobj.parent = &system_subsys.kobj;
|
||||
kset_set_kset_s(cls, system_subsys);
|
||||
return kset_register(&cls->kset);
|
||||
}
|
||||
@@ -309,7 +309,7 @@ void sysdev_shutdown(void)
|
||||
pr_debug("Shutting Down System Devices\n");
|
||||
|
||||
down(&sysdev_drivers_lock);
|
||||
list_for_each_entry_reverse(cls, &system_subsys.kset.list,
|
||||
list_for_each_entry_reverse(cls, &system_subsys.list,
|
||||
kset.kobj.entry) {
|
||||
struct sys_device * sysdev;
|
||||
|
||||
@@ -384,7 +384,7 @@ int sysdev_suspend(pm_message_t state)
|
||||
|
||||
pr_debug("Suspending System Devices\n");
|
||||
|
||||
list_for_each_entry_reverse(cls, &system_subsys.kset.list,
|
||||
list_for_each_entry_reverse(cls, &system_subsys.list,
|
||||
kset.kobj.entry) {
|
||||
|
||||
pr_debug("Suspending type '%s':\n",
|
||||
@@ -457,7 +457,7 @@ gbl_driver:
|
||||
}
|
||||
|
||||
/* resume other classes */
|
||||
list_for_each_entry_continue(cls, &system_subsys.kset.list,
|
||||
list_for_each_entry_continue(cls, &system_subsys.list,
|
||||
kset.kobj.entry) {
|
||||
list_for_each_entry(err_dev, &cls->kset.list, kobj.entry) {
|
||||
pr_debug(" %s\n", kobject_name(&err_dev->kobj));
|
||||
@@ -483,7 +483,7 @@ int sysdev_resume(void)
|
||||
|
||||
pr_debug("Resuming System Devices\n");
|
||||
|
||||
list_for_each_entry(cls, &system_subsys.kset.list, kset.kobj.entry) {
|
||||
list_for_each_entry(cls, &system_subsys.list, kset.kobj.entry) {
|
||||
struct sys_device * sysdev;
|
||||
|
||||
pr_debug("Resuming type '%s':\n",
|
||||
@@ -501,7 +501,7 @@ int sysdev_resume(void)
|
||||
|
||||
int __init system_bus_init(void)
|
||||
{
|
||||
system_subsys.kset.kobj.parent = &devices_subsys.kset.kobj;
|
||||
system_subsys.kobj.parent = &devices_subsys.kobj;
|
||||
return subsystem_register(&system_subsys);
|
||||
}
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@ static struct kobj_type ktype_efivar = {
|
||||
};
|
||||
|
||||
static ssize_t
|
||||
dummy(struct subsystem *sub, char *buf)
|
||||
dummy(struct kset *kset, char *buf)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -422,7 +422,7 @@ efivar_unregister(struct efivar_entry *var)
|
||||
|
||||
|
||||
static ssize_t
|
||||
efivar_create(struct subsystem *sub, const char *buf, size_t count)
|
||||
efivar_create(struct kset *kset, const char *buf, size_t count)
|
||||
{
|
||||
struct efi_variable *new_var = (struct efi_variable *)buf;
|
||||
struct efivar_entry *search_efivar, *n;
|
||||
@@ -480,7 +480,7 @@ efivar_create(struct subsystem *sub, const char *buf, size_t count)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
efivar_delete(struct subsystem *sub, const char *buf, size_t count)
|
||||
efivar_delete(struct kset *kset, const char *buf, size_t count)
|
||||
{
|
||||
struct efi_variable *del_var = (struct efi_variable *)buf;
|
||||
struct efivar_entry *search_efivar, *n;
|
||||
@@ -551,11 +551,11 @@ static struct subsys_attribute *var_subsys_attrs[] = {
|
||||
* the efivars driver
|
||||
*/
|
||||
static ssize_t
|
||||
systab_read(struct subsystem *entry, char *buf)
|
||||
systab_read(struct kset *kset, char *buf)
|
||||
{
|
||||
char *str = buf;
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
if (efi.mps != EFI_INVALID_TABLE_ADDR)
|
||||
@@ -687,7 +687,7 @@ efivars_init(void)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
kset_set_kset_s(&vars_subsys, efi_subsys);
|
||||
kobj_set_kset_s(&vars_subsys, efi_subsys);
|
||||
|
||||
error = subsystem_register(&vars_subsys);
|
||||
|
||||
|
||||
@@ -650,7 +650,7 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
|
||||
dev->cdev.dev, evdev->name);
|
||||
|
||||
/* temporary symlink to keep userspace happy */
|
||||
sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj,
|
||||
sysfs_create_link(&input_class.subsys.kobj, &cdev->kobj,
|
||||
evdev->name);
|
||||
|
||||
return &evdev->handle;
|
||||
@@ -661,7 +661,7 @@ static void evdev_disconnect(struct input_handle *handle)
|
||||
struct evdev *evdev = handle->private;
|
||||
struct evdev_list *list;
|
||||
|
||||
sysfs_remove_link(&input_class.subsys.kset.kobj, evdev->name);
|
||||
sysfs_remove_link(&input_class.subsys.kobj, evdev->name);
|
||||
class_device_destroy(&input_class,
|
||||
MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor));
|
||||
evdev->exist = 0;
|
||||
|
||||
@@ -539,7 +539,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
|
||||
dev->cdev.dev, joydev->name);
|
||||
|
||||
/* temporary symlink to keep userspace happy */
|
||||
sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj,
|
||||
sysfs_create_link(&input_class.subsys.kobj, &cdev->kobj,
|
||||
joydev->name);
|
||||
|
||||
return &joydev->handle;
|
||||
@@ -550,7 +550,7 @@ static void joydev_disconnect(struct input_handle *handle)
|
||||
struct joydev *joydev = handle->private;
|
||||
struct joydev_list *list;
|
||||
|
||||
sysfs_remove_link(&input_class.subsys.kset.kobj, joydev->name);
|
||||
sysfs_remove_link(&input_class.subsys.kobj, joydev->name);
|
||||
class_device_destroy(&input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
|
||||
joydev->exist = 0;
|
||||
|
||||
|
||||
@@ -661,7 +661,7 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
|
||||
dev->cdev.dev, mousedev->name);
|
||||
|
||||
/* temporary symlink to keep userspace happy */
|
||||
sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj,
|
||||
sysfs_create_link(&input_class.subsys.kobj, &cdev->kobj,
|
||||
mousedev->name);
|
||||
|
||||
return &mousedev->handle;
|
||||
@@ -672,7 +672,7 @@ static void mousedev_disconnect(struct input_handle *handle)
|
||||
struct mousedev *mousedev = handle->private;
|
||||
struct mousedev_list *list;
|
||||
|
||||
sysfs_remove_link(&input_class.subsys.kset.kobj, mousedev->name);
|
||||
sysfs_remove_link(&input_class.subsys.kobj, mousedev->name);
|
||||
class_device_destroy(&input_class,
|
||||
MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
|
||||
mousedev->exist = 0;
|
||||
|
||||
@@ -420,7 +420,7 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
|
||||
dev->cdev.dev, tsdev->name);
|
||||
|
||||
/* temporary symlink to keep userspace happy */
|
||||
sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj,
|
||||
sysfs_create_link(&input_class.subsys.kobj, &cdev->kobj,
|
||||
tsdev->name);
|
||||
|
||||
return &tsdev->handle;
|
||||
@@ -431,7 +431,7 @@ static void tsdev_disconnect(struct input_handle *handle)
|
||||
struct tsdev *tsdev = handle->private;
|
||||
struct tsdev_list *list;
|
||||
|
||||
sysfs_remove_link(&input_class.subsys.kset.kobj, tsdev->name);
|
||||
sysfs_remove_link(&input_class.subsys.kobj, tsdev->name);
|
||||
class_device_destroy(&input_class,
|
||||
MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor));
|
||||
tsdev->exist = 0;
|
||||
|
||||
+45
-45
@@ -520,15 +520,15 @@ static struct pdcspath_entry *pdcspath_entries[] = {
|
||||
|
||||
/**
|
||||
* pdcs_size_read - Stable Storage size output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_size_read(struct subsystem *entry, char *buf)
|
||||
pdcs_size_read(struct kset *kset, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
/* show the size of the stable storage */
|
||||
@@ -539,17 +539,17 @@ pdcs_size_read(struct subsystem *entry, char *buf)
|
||||
|
||||
/**
|
||||
* pdcs_auto_read - Stable Storage autoboot/search flag output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
* @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_auto_read(struct subsystem *entry, char *buf, int knob)
|
||||
pdcs_auto_read(struct kset *kset, char *buf, int knob)
|
||||
{
|
||||
char *out = buf;
|
||||
struct pdcspath_entry *pathentry;
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
/* Current flags are stored in primary boot path entry */
|
||||
@@ -565,40 +565,40 @@ pdcs_auto_read(struct subsystem *entry, char *buf, int knob)
|
||||
|
||||
/**
|
||||
* pdcs_autoboot_read - Stable Storage autoboot flag output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*/
|
||||
static inline ssize_t
|
||||
pdcs_autoboot_read(struct subsystem *entry, char *buf)
|
||||
pdcs_autoboot_read(struct kset *kset, char *buf)
|
||||
{
|
||||
return pdcs_auto_read(entry, buf, PF_AUTOBOOT);
|
||||
return pdcs_auto_read(kset, buf, PF_AUTOBOOT);
|
||||
}
|
||||
|
||||
/**
|
||||
* pdcs_autosearch_read - Stable Storage autoboot flag output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*/
|
||||
static inline ssize_t
|
||||
pdcs_autosearch_read(struct subsystem *entry, char *buf)
|
||||
pdcs_autosearch_read(struct kset *kset, char *buf)
|
||||
{
|
||||
return pdcs_auto_read(entry, buf, PF_AUTOSEARCH);
|
||||
return pdcs_auto_read(kset, buf, PF_AUTOSEARCH);
|
||||
}
|
||||
|
||||
/**
|
||||
* pdcs_timer_read - Stable Storage timer count output (in seconds).
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*
|
||||
* The value of the timer field correponds to a number of seconds in powers of 2.
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_timer_read(struct subsystem *entry, char *buf)
|
||||
pdcs_timer_read(struct kset *kset, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
struct pdcspath_entry *pathentry;
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
/* Current flags are stored in primary boot path entry */
|
||||
@@ -615,15 +615,15 @@ pdcs_timer_read(struct subsystem *entry, char *buf)
|
||||
|
||||
/**
|
||||
* pdcs_osid_read - Stable Storage OS ID register output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_osid_read(struct subsystem *entry, char *buf)
|
||||
pdcs_osid_read(struct kset *kset, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
out += sprintf(out, "%s dependent data (0x%.4x)\n",
|
||||
@@ -634,18 +634,18 @@ pdcs_osid_read(struct subsystem *entry, char *buf)
|
||||
|
||||
/**
|
||||
* pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*
|
||||
* This can hold 16 bytes of OS-Dependent data.
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_osdep1_read(struct subsystem *entry, char *buf)
|
||||
pdcs_osdep1_read(struct kset *kset, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
u32 result[4];
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
if (pdc_stable_read(PDCS_ADDR_OSD1, &result, sizeof(result)) != PDC_OK)
|
||||
@@ -661,18 +661,18 @@ pdcs_osdep1_read(struct subsystem *entry, char *buf)
|
||||
|
||||
/**
|
||||
* pdcs_diagnostic_read - Stable Storage Diagnostic register output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*
|
||||
* I have NFC how to interpret the content of that register ;-).
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_diagnostic_read(struct subsystem *entry, char *buf)
|
||||
pdcs_diagnostic_read(struct kset *kset, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
u32 result;
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
/* get diagnostic */
|
||||
@@ -686,18 +686,18 @@ pdcs_diagnostic_read(struct subsystem *entry, char *buf)
|
||||
|
||||
/**
|
||||
* pdcs_fastsize_read - Stable Storage FastSize register output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*
|
||||
* This register holds the amount of system RAM to be tested during boot sequence.
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_fastsize_read(struct subsystem *entry, char *buf)
|
||||
pdcs_fastsize_read(struct kset *kset, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
u32 result;
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
/* get fast-size */
|
||||
@@ -715,13 +715,13 @@ pdcs_fastsize_read(struct subsystem *entry, char *buf)
|
||||
|
||||
/**
|
||||
* pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The output buffer to write to.
|
||||
*
|
||||
* This can hold pdcs_size - 224 bytes of OS-Dependent data, when available.
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_osdep2_read(struct subsystem *entry, char *buf)
|
||||
pdcs_osdep2_read(struct kset *kset, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
unsigned long size;
|
||||
@@ -733,7 +733,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf)
|
||||
|
||||
size = pdcs_size - 224;
|
||||
|
||||
if (!entry || !buf)
|
||||
if (!kset || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
for (i=0; i<size; i+=4) {
|
||||
@@ -748,7 +748,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf)
|
||||
|
||||
/**
|
||||
* pdcs_auto_write - This function handles autoboot/search flag modifying.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The input buffer to read from.
|
||||
* @count: The number of bytes to be read.
|
||||
* @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag
|
||||
@@ -758,7 +758,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf)
|
||||
* \"n\" (n == 0 or 1) to toggle AutoBoot Off or On
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_auto_write(struct subsystem *entry, const char *buf, size_t count, int knob)
|
||||
pdcs_auto_write(struct kset *kset, const char *buf, size_t count, int knob)
|
||||
{
|
||||
struct pdcspath_entry *pathentry;
|
||||
unsigned char flags;
|
||||
@@ -768,7 +768,7 @@ pdcs_auto_write(struct subsystem *entry, const char *buf, size_t count, int knob
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EACCES;
|
||||
|
||||
if (!entry || !buf || !count)
|
||||
if (!kset || !buf || !count)
|
||||
return -EINVAL;
|
||||
|
||||
/* We'll use a local copy of buf */
|
||||
@@ -823,7 +823,7 @@ parse_error:
|
||||
|
||||
/**
|
||||
* pdcs_autoboot_write - This function handles autoboot flag modifying.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The input buffer to read from.
|
||||
* @count: The number of bytes to be read.
|
||||
*
|
||||
@@ -832,14 +832,14 @@ parse_error:
|
||||
* \"n\" (n == 0 or 1) to toggle AutoSearch Off or On
|
||||
*/
|
||||
static inline ssize_t
|
||||
pdcs_autoboot_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
pdcs_autoboot_write(struct kset *kset, const char *buf, size_t count)
|
||||
{
|
||||
return pdcs_auto_write(entry, buf, count, PF_AUTOBOOT);
|
||||
return pdcs_auto_write(kset, buf, count, PF_AUTOBOOT);
|
||||
}
|
||||
|
||||
/**
|
||||
* pdcs_autosearch_write - This function handles autosearch flag modifying.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The input buffer to read from.
|
||||
* @count: The number of bytes to be read.
|
||||
*
|
||||
@@ -848,14 +848,14 @@ pdcs_autoboot_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
* \"n\" (n == 0 or 1) to toggle AutoSearch Off or On
|
||||
*/
|
||||
static inline ssize_t
|
||||
pdcs_autosearch_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
pdcs_autosearch_write(struct kset *kset, const char *buf, size_t count)
|
||||
{
|
||||
return pdcs_auto_write(entry, buf, count, PF_AUTOSEARCH);
|
||||
return pdcs_auto_write(kset, buf, count, PF_AUTOSEARCH);
|
||||
}
|
||||
|
||||
/**
|
||||
* pdcs_osdep1_write - Stable Storage OS-Dependent data area 1 input.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The input buffer to read from.
|
||||
* @count: The number of bytes to be read.
|
||||
*
|
||||
@@ -864,14 +864,14 @@ pdcs_autosearch_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
* its input buffer.
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
pdcs_osdep1_write(struct kset *kset, const char *buf, size_t count)
|
||||
{
|
||||
u8 in[16];
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EACCES;
|
||||
|
||||
if (!entry || !buf || !count)
|
||||
if (!kset || !buf || !count)
|
||||
return -EINVAL;
|
||||
|
||||
if (unlikely(pdcs_osid != OS_ID_LINUX))
|
||||
@@ -892,7 +892,7 @@ pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
|
||||
/**
|
||||
* pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input.
|
||||
* @entry: An allocated and populated subsytem struct. We don't use it tho.
|
||||
* @kset: An allocated and populated struct kset. We don't use it tho.
|
||||
* @buf: The input buffer to read from.
|
||||
* @count: The number of bytes to be read.
|
||||
*
|
||||
@@ -901,7 +901,7 @@ pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
* constructing its input buffer.
|
||||
*/
|
||||
static ssize_t
|
||||
pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
pdcs_osdep2_write(struct kset *kset, const char *buf, size_t count)
|
||||
{
|
||||
unsigned long size;
|
||||
unsigned short i;
|
||||
@@ -910,7 +910,7 @@ pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count)
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EACCES;
|
||||
|
||||
if (!entry || !buf || !count)
|
||||
if (!kset || !buf || !count)
|
||||
return -EINVAL;
|
||||
|
||||
if (unlikely(pdcs_size <= 224))
|
||||
|
||||
@@ -424,7 +424,7 @@ static int __init ibm_acpiphp_init(void)
|
||||
int retval = 0;
|
||||
acpi_status status;
|
||||
struct acpi_device *device;
|
||||
struct kobject *sysdir = &pci_hotplug_slots_subsys.kset.kobj;
|
||||
struct kobject *sysdir = &pci_hotplug_slots_subsys.kobj;
|
||||
|
||||
dbg("%s\n", __FUNCTION__);
|
||||
|
||||
@@ -471,7 +471,7 @@ init_return:
|
||||
static void __exit ibm_acpiphp_exit(void)
|
||||
{
|
||||
acpi_status status;
|
||||
struct kobject *sysdir = &pci_hotplug_slots_subsys.kset.kobj;
|
||||
struct kobject *sysdir = &pci_hotplug_slots_subsys.kobj;
|
||||
|
||||
dbg("%s\n", __FUNCTION__);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ static int debug;
|
||||
|
||||
static LIST_HEAD(pci_hotplug_slot_list);
|
||||
|
||||
struct subsystem pci_hotplug_slots_subsys;
|
||||
struct kset pci_hotplug_slots_subsys;
|
||||
|
||||
static ssize_t hotplug_slot_attr_show(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf)
|
||||
@@ -764,7 +764,7 @@ static int __init pci_hotplug_init (void)
|
||||
{
|
||||
int result;
|
||||
|
||||
kset_set_kset_s(&pci_hotplug_slots_subsys, pci_bus_type.subsys);
|
||||
kobj_set_kset_s(&pci_hotplug_slots_subsys, pci_bus_type.subsys);
|
||||
result = subsystem_register(&pci_hotplug_slots_subsys);
|
||||
if (result) {
|
||||
err("Register subsys with error %d\n", result);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user