Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: remove "struct subsystem" as it is no longer needed sysfs: printk format warning DOC: Fix wrong identifier name in Documentation/driver-model/devres.txt platform: reorder platform_device_del Driver core: fix show_uevent from taking up way too much stack
This commit is contained in:
@@ -53,7 +53,7 @@ struct bus_type {
|
||||
const char * name;
|
||||
struct module * owner;
|
||||
|
||||
struct subsystem subsys;
|
||||
struct kset subsys;
|
||||
struct kset drivers;
|
||||
struct kset devices;
|
||||
struct klist klist_devices;
|
||||
@@ -178,7 +178,7 @@ struct class {
|
||||
const char * name;
|
||||
struct module * owner;
|
||||
|
||||
struct subsystem subsys;
|
||||
struct kset subsys;
|
||||
struct list_head children;
|
||||
struct list_head devices;
|
||||
struct list_head interfaces;
|
||||
@@ -558,8 +558,8 @@ extern void device_shutdown(void);
|
||||
|
||||
|
||||
/* drivers/base/firmware.c */
|
||||
extern int __must_check firmware_register(struct subsystem *);
|
||||
extern void firmware_unregister(struct subsystem *);
|
||||
extern int __must_check firmware_register(struct kset *);
|
||||
extern void firmware_unregister(struct kset *);
|
||||
|
||||
/* debugging and troubleshooting/diagnostic helpers. */
|
||||
extern const char *dev_driver_string(struct device *dev);
|
||||
|
@@ -1416,7 +1416,7 @@ extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
|
||||
extern int vfs_statfs(struct dentry *, struct kstatfs *);
|
||||
|
||||
/* /sys/fs */
|
||||
extern struct subsystem fs_subsys;
|
||||
extern struct kset fs_subsys;
|
||||
|
||||
#define FLOCK_VERIFY_READ 1
|
||||
#define FLOCK_VERIFY_WRITE 2
|
||||
|
@@ -124,7 +124,6 @@ struct kset_uevent_ops {
|
||||
};
|
||||
|
||||
struct kset {
|
||||
struct subsystem * subsys;
|
||||
struct kobj_type * ktype;
|
||||
struct list_head list;
|
||||
spinlock_t list_lock;
|
||||
@@ -171,32 +170,23 @@ extern struct kobject * kset_find_obj(struct kset *, const char *);
|
||||
#define set_kset_name(str) .kset = { .kobj = { .name = str } }
|
||||
|
||||
|
||||
|
||||
struct subsystem {
|
||||
struct kset kset;
|
||||
};
|
||||
|
||||
#define decl_subsys(_name,_type,_uevent_ops) \
|
||||
struct subsystem _name##_subsys = { \
|
||||
.kset = { \
|
||||
.kobj = { .name = __stringify(_name) }, \
|
||||
.ktype = _type, \
|
||||
.uevent_ops =_uevent_ops, \
|
||||
} \
|
||||
struct kset _name##_subsys = { \
|
||||
.kobj = { .name = __stringify(_name) }, \
|
||||
.ktype = _type, \
|
||||
.uevent_ops =_uevent_ops, \
|
||||
}
|
||||
#define decl_subsys_name(_varname,_name,_type,_uevent_ops) \
|
||||
struct subsystem _varname##_subsys = { \
|
||||
.kset = { \
|
||||
.kobj = { .name = __stringify(_name) }, \
|
||||
.ktype = _type, \
|
||||
.uevent_ops =_uevent_ops, \
|
||||
} \
|
||||
struct kset _varname##_subsys = { \
|
||||
.kobj = { .name = __stringify(_name) }, \
|
||||
.ktype = _type, \
|
||||
.uevent_ops =_uevent_ops, \
|
||||
}
|
||||
|
||||
/* The global /sys/kernel/ subsystem for people to chain off of */
|
||||
extern struct subsystem kernel_subsys;
|
||||
extern struct kset kernel_subsys;
|
||||
/* The global /sys/hypervisor/ subsystem */
|
||||
extern struct subsystem hypervisor_subsys;
|
||||
extern struct kset hypervisor_subsys;
|
||||
|
||||
/**
|
||||
* Helpers for setting the kset of registered objects.
|
||||
@@ -214,7 +204,7 @@ extern struct subsystem hypervisor_subsys;
|
||||
*/
|
||||
|
||||
#define kobj_set_kset_s(obj,subsys) \
|
||||
(obj)->kobj.kset = &(subsys).kset
|
||||
(obj)->kobj.kset = &(subsys)
|
||||
|
||||
/**
|
||||
* kset_set_kset_s(obj,subsys) - set kset for embedded kset.
|
||||
@@ -228,7 +218,7 @@ extern struct subsystem hypervisor_subsys;
|
||||
*/
|
||||
|
||||
#define kset_set_kset_s(obj,subsys) \
|
||||
(obj)->kset.kobj.kset = &(subsys).kset
|
||||
(obj)->kset.kobj.kset = &(subsys)
|
||||
|
||||
/**
|
||||
* subsys_set_kset(obj,subsys) - set kset for subsystem
|
||||
@@ -241,29 +231,31 @@ extern struct subsystem hypervisor_subsys;
|
||||
*/
|
||||
|
||||
#define subsys_set_kset(obj,_subsys) \
|
||||
(obj)->subsys.kset.kobj.kset = &(_subsys).kset
|
||||
(obj)->subsys.kobj.kset = &(_subsys)
|
||||
|
||||
extern void subsystem_init(struct subsystem *);
|
||||
extern int __must_check subsystem_register(struct subsystem *);
|
||||
extern void subsystem_unregister(struct subsystem *);
|
||||
extern void subsystem_init(struct kset *);
|
||||
extern int __must_check subsystem_register(struct kset *);
|
||||
extern void subsystem_unregister(struct kset *);
|
||||
|
||||
static inline struct subsystem * subsys_get(struct subsystem * s)
|
||||
static inline struct kset *subsys_get(struct kset *s)
|
||||
{
|
||||
return s ? container_of(kset_get(&s->kset),struct subsystem,kset) : NULL;
|
||||
if (s)
|
||||
return kset_get(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void subsys_put(struct subsystem * s)
|
||||
static inline void subsys_put(struct kset *s)
|
||||
{
|
||||
kset_put(&s->kset);
|
||||
kset_put(s);
|
||||
}
|
||||
|
||||
struct subsys_attribute {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct subsystem *, char *);
|
||||
ssize_t (*store)(struct subsystem *, const char *, size_t);
|
||||
ssize_t (*show)(struct kset *, char *);
|
||||
ssize_t (*store)(struct kset *, const char *, size_t);
|
||||
};
|
||||
|
||||
extern int __must_check subsys_create_file(struct subsystem * ,
|
||||
extern int __must_check subsys_create_file(struct kset *,
|
||||
struct subsys_attribute *);
|
||||
|
||||
#if defined(CONFIG_HOTPLUG)
|
||||
|
@@ -568,7 +568,7 @@ struct device_driver;
|
||||
#ifdef CONFIG_SYSFS
|
||||
struct module;
|
||||
|
||||
extern struct subsystem module_subsys;
|
||||
extern struct kset module_subsys;
|
||||
|
||||
int mod_sysfs_init(struct module *mod);
|
||||
int mod_sysfs_setup(struct module *mod,
|
||||
|
@@ -174,7 +174,7 @@ extern int pci_hp_register (struct hotplug_slot *slot);
|
||||
extern int pci_hp_deregister (struct hotplug_slot *slot);
|
||||
extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot,
|
||||
struct hotplug_slot_info *info);
|
||||
extern struct subsystem pci_hotplug_slots_subsys;
|
||||
extern struct kset pci_hotplug_slots_subsys;
|
||||
|
||||
/* PCI Setting Record (Type 0) */
|
||||
struct hpp_type0 {
|
||||
|
Reference in New Issue
Block a user