diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/base.h | 2 | ||||
-rw-r--r-- | drivers/base/bus.c | 16 | ||||
-rw-r--r-- | drivers/base/class.c | 18 | ||||
-rw-r--r-- | drivers/base/core.c | 29 | ||||
-rw-r--r-- | drivers/base/firmware.c | 6 | ||||
-rw-r--r-- | drivers/base/platform.c | 8 | ||||
-rw-r--r-- | drivers/base/power/shutdown.c | 4 | ||||
-rw-r--r-- | drivers/base/sys.c | 14 | ||||
-rw-r--r-- | drivers/firmware/efivars.c | 12 | ||||
-rw-r--r-- | drivers/input/evdev.c | 4 | ||||
-rw-r--r-- | drivers/input/joydev.c | 4 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 4 | ||||
-rw-r--r-- | drivers/input/tsdev.c | 4 | ||||
-rw-r--r-- | drivers/parisc/pdc_stable.c | 94 | ||||
-rw-r--r-- | drivers/pci/hotplug/acpiphp_ibm.c | 4 | ||||
-rw-r--r-- | drivers/pci/hotplug/pci_hotplug_core.c | 4 |
16 files changed, 116 insertions, 111 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h index d597f2659b23..5512d84452f2 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h | |||
@@ -45,3 +45,5 @@ struct class_device_attribute *to_class_dev_attr(struct attribute *_attr) | |||
45 | extern char *make_class_name(const char *name, struct kobject *kobj); | 45 | extern char *make_class_name(const char *name, struct kobject *kobj); |
46 | 46 | ||
47 | extern void devres_release_all(struct device *dev); | 47 | extern void devres_release_all(struct device *dev); |
48 | |||
49 | extern struct kset devices_subsys; | ||
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 1d76e2349654..dca734819e50 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include "power/power.h" | 17 | #include "power/power.h" |
18 | 18 | ||
19 | #define to_bus_attr(_attr) container_of(_attr, struct bus_attribute, attr) | 19 | #define to_bus_attr(_attr) container_of(_attr, struct bus_attribute, attr) |
20 | #define to_bus(obj) container_of(obj, struct bus_type, subsys.kset.kobj) | 20 | #define to_bus(obj) container_of(obj, struct bus_type, subsys.kobj) |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * sysfs bindings for drivers | 23 | * sysfs bindings for drivers |
@@ -123,7 +123,7 @@ int bus_create_file(struct bus_type * bus, struct bus_attribute * attr) | |||
123 | { | 123 | { |
124 | int error; | 124 | int error; |
125 | if (get_bus(bus)) { | 125 | if (get_bus(bus)) { |
126 | error = sysfs_create_file(&bus->subsys.kset.kobj, &attr->attr); | 126 | error = sysfs_create_file(&bus->subsys.kobj, &attr->attr); |
127 | put_bus(bus); | 127 | put_bus(bus); |
128 | } else | 128 | } else |
129 | error = -EINVAL; | 129 | error = -EINVAL; |
@@ -133,7 +133,7 @@ int bus_create_file(struct bus_type * bus, struct bus_attribute * attr) | |||
133 | void bus_remove_file(struct bus_type * bus, struct bus_attribute * attr) | 133 | void bus_remove_file(struct bus_type * bus, struct bus_attribute * attr) |
134 | { | 134 | { |
135 | if (get_bus(bus)) { | 135 | if (get_bus(bus)) { |
136 | sysfs_remove_file(&bus->subsys.kset.kobj, &attr->attr); | 136 | sysfs_remove_file(&bus->subsys.kobj, &attr->attr); |
137 | put_bus(bus); | 137 | put_bus(bus); |
138 | } | 138 | } |
139 | } | 139 | } |
@@ -397,7 +397,7 @@ static void device_remove_attrs(struct bus_type * bus, struct device * dev) | |||
397 | static int make_deprecated_bus_links(struct device *dev) | 397 | static int make_deprecated_bus_links(struct device *dev) |
398 | { | 398 | { |
399 | return sysfs_create_link(&dev->kobj, | 399 | return sysfs_create_link(&dev->kobj, |
400 | &dev->bus->subsys.kset.kobj, "bus"); | 400 | &dev->bus->subsys.kobj, "bus"); |
401 | } | 401 | } |
402 | 402 | ||
403 | static void remove_deprecated_bus_links(struct device *dev) | 403 | static void remove_deprecated_bus_links(struct device *dev) |
@@ -431,7 +431,7 @@ int bus_add_device(struct device * dev) | |||
431 | if (error) | 431 | if (error) |
432 | goto out_id; | 432 | goto out_id; |
433 | error = sysfs_create_link(&dev->kobj, | 433 | error = sysfs_create_link(&dev->kobj, |
434 | &dev->bus->subsys.kset.kobj, "subsystem"); | 434 | &dev->bus->subsys.kobj, "subsystem"); |
435 | if (error) | 435 | if (error) |
436 | goto out_subsys; | 436 | goto out_subsys; |
437 | error = make_deprecated_bus_links(dev); | 437 | error = make_deprecated_bus_links(dev); |
@@ -810,7 +810,7 @@ int bus_register(struct bus_type * bus) | |||
810 | 810 | ||
811 | BLOCKING_INIT_NOTIFIER_HEAD(&bus->bus_notifier); | 811 | BLOCKING_INIT_NOTIFIER_HEAD(&bus->bus_notifier); |
812 | 812 | ||
813 | retval = kobject_set_name(&bus->subsys.kset.kobj, "%s", bus->name); | 813 | retval = kobject_set_name(&bus->subsys.kobj, "%s", bus->name); |
814 | if (retval) | 814 | if (retval) |
815 | goto out; | 815 | goto out; |
816 | 816 | ||
@@ -820,13 +820,13 @@ int bus_register(struct bus_type * bus) | |||
820 | goto out; | 820 | goto out; |
821 | 821 | ||
822 | kobject_set_name(&bus->devices.kobj, "devices"); | 822 | kobject_set_name(&bus->devices.kobj, "devices"); |
823 | bus->devices.subsys = &bus->subsys; | 823 | bus->devices.kobj.parent = &bus->subsys.kobj; |
824 | retval = kset_register(&bus->devices); | 824 | retval = kset_register(&bus->devices); |
825 | if (retval) | 825 | if (retval) |
826 | goto bus_devices_fail; | 826 | goto bus_devices_fail; |
827 | 827 | ||
828 | kobject_set_name(&bus->drivers.kobj, "drivers"); | 828 | kobject_set_name(&bus->drivers.kobj, "drivers"); |
829 | bus->drivers.subsys = &bus->subsys; | 829 | bus->drivers.kobj.parent = &bus->subsys.kobj; |
830 | bus->drivers.ktype = &ktype_driver; | 830 | bus->drivers.ktype = &ktype_driver; |
831 | retval = kset_register(&bus->drivers); | 831 | retval = kset_register(&bus->drivers); |
832 | if (retval) | 832 | if (retval) |
diff --git a/drivers/base/class.c b/drivers/base/class.c index 80bbb2074636..20c4ea6eb50d 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -19,10 +19,8 @@ | |||
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include "base.h" | 20 | #include "base.h" |
21 | 21 | ||
22 | extern struct subsystem devices_subsys; | ||
23 | |||
24 | #define to_class_attr(_attr) container_of(_attr, struct class_attribute, attr) | 22 | #define to_class_attr(_attr) container_of(_attr, struct class_attribute, attr) |
25 | #define to_class(obj) container_of(obj, struct class, subsys.kset.kobj) | 23 | #define to_class(obj) container_of(obj, struct class, subsys.kobj) |
26 | 24 | ||
27 | static ssize_t | 25 | static ssize_t |
28 | class_attr_show(struct kobject * kobj, struct attribute * attr, char * buf) | 26 | 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) | |||
80 | { | 78 | { |
81 | int error; | 79 | int error; |
82 | if (cls) { | 80 | if (cls) { |
83 | error = sysfs_create_file(&cls->subsys.kset.kobj, &attr->attr); | 81 | error = sysfs_create_file(&cls->subsys.kobj, &attr->attr); |
84 | } else | 82 | } else |
85 | error = -EINVAL; | 83 | error = -EINVAL; |
86 | return error; | 84 | return error; |
@@ -89,7 +87,7 @@ int class_create_file(struct class * cls, const struct class_attribute * attr) | |||
89 | void class_remove_file(struct class * cls, const struct class_attribute * attr) | 87 | void class_remove_file(struct class * cls, const struct class_attribute * attr) |
90 | { | 88 | { |
91 | if (cls) | 89 | if (cls) |
92 | sysfs_remove_file(&cls->subsys.kset.kobj, &attr->attr); | 90 | sysfs_remove_file(&cls->subsys.kobj, &attr->attr); |
93 | } | 91 | } |
94 | 92 | ||
95 | static struct class *class_get(struct class *cls) | 93 | static struct class *class_get(struct class *cls) |
@@ -147,7 +145,7 @@ int class_register(struct class * cls) | |||
147 | INIT_LIST_HEAD(&cls->interfaces); | 145 | INIT_LIST_HEAD(&cls->interfaces); |
148 | kset_init(&cls->class_dirs); | 146 | kset_init(&cls->class_dirs); |
149 | init_MUTEX(&cls->sem); | 147 | init_MUTEX(&cls->sem); |
150 | error = kobject_set_name(&cls->subsys.kset.kobj, "%s", cls->name); | 148 | error = kobject_set_name(&cls->subsys.kobj, "%s", cls->name); |
151 | if (error) | 149 | if (error) |
152 | return error; | 150 | return error; |
153 | 151 | ||
@@ -611,7 +609,7 @@ int class_device_add(struct class_device *class_dev) | |||
611 | if (parent_class_dev) | 609 | if (parent_class_dev) |
612 | class_dev->kobj.parent = &parent_class_dev->kobj; | 610 | class_dev->kobj.parent = &parent_class_dev->kobj; |
613 | else | 611 | else |
614 | class_dev->kobj.parent = &parent_class->subsys.kset.kobj; | 612 | class_dev->kobj.parent = &parent_class->subsys.kobj; |
615 | 613 | ||
616 | error = kobject_add(&class_dev->kobj); | 614 | error = kobject_add(&class_dev->kobj); |
617 | if (error) | 615 | if (error) |
@@ -619,7 +617,7 @@ int class_device_add(struct class_device *class_dev) | |||
619 | 617 | ||
620 | /* add the needed attributes to this device */ | 618 | /* add the needed attributes to this device */ |
621 | error = sysfs_create_link(&class_dev->kobj, | 619 | error = sysfs_create_link(&class_dev->kobj, |
622 | &parent_class->subsys.kset.kobj, "subsystem"); | 620 | &parent_class->subsys.kobj, "subsystem"); |
623 | if (error) | 621 | if (error) |
624 | goto out3; | 622 | goto out3; |
625 | class_dev->uevent_attr.attr.name = "uevent"; | 623 | class_dev->uevent_attr.attr.name = "uevent"; |
@@ -917,8 +915,8 @@ int __init classes_init(void) | |||
917 | /* ick, this is ugly, the things we go through to keep from showing up | 915 | /* ick, this is ugly, the things we go through to keep from showing up |
918 | * in sysfs... */ | 916 | * in sysfs... */ |
919 | subsystem_init(&class_obj_subsys); | 917 | subsystem_init(&class_obj_subsys); |
920 | if (!class_obj_subsys.kset.subsys) | 918 | if (!class_obj_subsys.kobj.parent) |
921 | class_obj_subsys.kset.subsys = &class_obj_subsys; | 919 | class_obj_subsys.kobj.parent = &class_obj_subsys.kobj; |
922 | return 0; | 920 | return 0; |
923 | } | 921 | } |
924 | 922 | ||
diff --git a/drivers/base/core.c b/drivers/base/core.c index 8aa090da1cd7..b78fc1e68264 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -252,7 +252,7 @@ static ssize_t show_uevent(struct device *dev, struct device_attribute *attr, | |||
252 | struct kobject *top_kobj; | 252 | struct kobject *top_kobj; |
253 | struct kset *kset; | 253 | struct kset *kset; |
254 | char *envp[32]; | 254 | char *envp[32]; |
255 | char data[PAGE_SIZE]; | 255 | char *data = NULL; |
256 | char *pos; | 256 | char *pos; |
257 | int i; | 257 | int i; |
258 | size_t count = 0; | 258 | size_t count = 0; |
@@ -276,6 +276,10 @@ static ssize_t show_uevent(struct device *dev, struct device_attribute *attr, | |||
276 | if (!kset->uevent_ops->filter(kset, &dev->kobj)) | 276 | if (!kset->uevent_ops->filter(kset, &dev->kobj)) |
277 | goto out; | 277 | goto out; |
278 | 278 | ||
279 | data = (char *)get_zeroed_page(GFP_KERNEL); | ||
280 | if (!data) | ||
281 | return -ENOMEM; | ||
282 | |||
279 | /* let the kset specific function add its keys */ | 283 | /* let the kset specific function add its keys */ |
280 | pos = data; | 284 | pos = data; |
281 | retval = kset->uevent_ops->uevent(kset, &dev->kobj, | 285 | retval = kset->uevent_ops->uevent(kset, &dev->kobj, |
@@ -290,6 +294,7 @@ static ssize_t show_uevent(struct device *dev, struct device_attribute *attr, | |||
290 | count += sprintf(pos, "%s\n", envp[i]); | 294 | count += sprintf(pos, "%s\n", envp[i]); |
291 | } | 295 | } |
292 | out: | 296 | out: |
297 | free_page((unsigned long)data); | ||
293 | return count; | 298 | return count; |
294 | } | 299 | } |
295 | 300 | ||
@@ -560,7 +565,7 @@ static struct kobject * get_device_parent(struct device *dev, | |||
560 | /* Set the parent to the class, not the parent device */ | 565 | /* Set the parent to the class, not the parent device */ |
561 | /* this keeps sysfs from having a symlink to make old udevs happy */ | 566 | /* this keeps sysfs from having a symlink to make old udevs happy */ |
562 | if (dev->class) | 567 | if (dev->class) |
563 | return &dev->class->subsys.kset.kobj; | 568 | return &dev->class->subsys.kobj; |
564 | else if (parent) | 569 | else if (parent) |
565 | return &parent->kobj; | 570 | return &parent->kobj; |
566 | 571 | ||
@@ -572,7 +577,7 @@ static struct kobject *virtual_device_parent(struct device *dev) | |||
572 | static struct kobject *virtual_dir = NULL; | 577 | static struct kobject *virtual_dir = NULL; |
573 | 578 | ||
574 | if (!virtual_dir) | 579 | if (!virtual_dir) |
575 | virtual_dir = kobject_add_dir(&devices_subsys.kset.kobj, "virtual"); | 580 | virtual_dir = kobject_add_dir(&devices_subsys.kobj, "virtual"); |
576 | 581 | ||
577 | return virtual_dir; | 582 | return virtual_dir; |
578 | } | 583 | } |
@@ -706,12 +711,12 @@ int device_add(struct device *dev) | |||
706 | } | 711 | } |
707 | 712 | ||
708 | if (dev->class) { | 713 | if (dev->class) { |
709 | sysfs_create_link(&dev->kobj, &dev->class->subsys.kset.kobj, | 714 | sysfs_create_link(&dev->kobj, &dev->class->subsys.kobj, |
710 | "subsystem"); | 715 | "subsystem"); |
711 | /* If this is not a "fake" compatible device, then create the | 716 | /* If this is not a "fake" compatible device, then create the |
712 | * symlink from the class to the device. */ | 717 | * symlink from the class to the device. */ |
713 | if (dev->kobj.parent != &dev->class->subsys.kset.kobj) | 718 | if (dev->kobj.parent != &dev->class->subsys.kobj) |
714 | sysfs_create_link(&dev->class->subsys.kset.kobj, | 719 | sysfs_create_link(&dev->class->subsys.kobj, |
715 | &dev->kobj, dev->bus_id); | 720 | &dev->kobj, dev->bus_id); |
716 | if (parent) { | 721 | if (parent) { |
717 | sysfs_create_link(&dev->kobj, &dev->parent->kobj, | 722 | sysfs_create_link(&dev->kobj, &dev->parent->kobj, |
@@ -769,8 +774,8 @@ int device_add(struct device *dev) | |||
769 | sysfs_remove_link(&dev->kobj, "subsystem"); | 774 | sysfs_remove_link(&dev->kobj, "subsystem"); |
770 | /* If this is not a "fake" compatible device, remove the | 775 | /* If this is not a "fake" compatible device, remove the |
771 | * symlink from the class to the device. */ | 776 | * symlink from the class to the device. */ |
772 | if (dev->kobj.parent != &dev->class->subsys.kset.kobj) | 777 | if (dev->kobj.parent != &dev->class->subsys.kobj) |
773 | sysfs_remove_link(&dev->class->subsys.kset.kobj, | 778 | sysfs_remove_link(&dev->class->subsys.kobj, |
774 | dev->bus_id); | 779 | dev->bus_id); |
775 | if (parent) { | 780 | if (parent) { |
776 | #ifdef CONFIG_SYSFS_DEPRECATED | 781 | #ifdef CONFIG_SYSFS_DEPRECATED |
@@ -870,8 +875,8 @@ void device_del(struct device * dev) | |||
870 | sysfs_remove_link(&dev->kobj, "subsystem"); | 875 | sysfs_remove_link(&dev->kobj, "subsystem"); |
871 | /* If this is not a "fake" compatible device, remove the | 876 | /* If this is not a "fake" compatible device, remove the |
872 | * symlink from the class to the device. */ | 877 | * symlink from the class to the device. */ |
873 | if (dev->kobj.parent != &dev->class->subsys.kset.kobj) | 878 | if (dev->kobj.parent != &dev->class->subsys.kobj) |
874 | sysfs_remove_link(&dev->class->subsys.kset.kobj, | 879 | sysfs_remove_link(&dev->class->subsys.kobj, |
875 | dev->bus_id); | 880 | dev->bus_id); |
876 | if (parent) { | 881 | if (parent) { |
877 | #ifdef CONFIG_SYSFS_DEPRECATED | 882 | #ifdef CONFIG_SYSFS_DEPRECATED |
@@ -1187,9 +1192,9 @@ int device_rename(struct device *dev, char *new_name) | |||
1187 | #endif | 1192 | #endif |
1188 | 1193 | ||
1189 | if (dev->class) { | 1194 | if (dev->class) { |
1190 | sysfs_remove_link(&dev->class->subsys.kset.kobj, | 1195 | sysfs_remove_link(&dev->class->subsys.kobj, |
1191 | old_symlink_name); | 1196 | old_symlink_name); |
1192 | sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj, | 1197 | sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj, |
1193 | dev->bus_id); | 1198 | dev->bus_id); |
1194 | } | 1199 | } |
1195 | put_device(dev); | 1200 | put_device(dev); |
diff --git a/drivers/base/firmware.c b/drivers/base/firmware.c index cb1b98ae0d58..90c862932169 100644 --- a/drivers/base/firmware.c +++ b/drivers/base/firmware.c | |||
@@ -17,13 +17,13 @@ | |||
17 | 17 | ||
18 | static decl_subsys(firmware, NULL, NULL); | 18 | static decl_subsys(firmware, NULL, NULL); |
19 | 19 | ||
20 | int firmware_register(struct subsystem * s) | 20 | int firmware_register(struct kset *s) |
21 | { | 21 | { |
22 | kset_set_kset_s(s, firmware_subsys); | 22 | kobj_set_kset_s(s, firmware_subsys); |
23 | return subsystem_register(s); | 23 | return subsystem_register(s); |
24 | } | 24 | } |
25 | 25 | ||
26 | void firmware_unregister(struct subsystem * s) | 26 | void firmware_unregister(struct kset *s) |
27 | { | 27 | { |
28 | subsystem_unregister(s); | 28 | subsystem_unregister(s); |
29 | } | 29 | } |
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 30480f6f2af2..17b5ece8f82c 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -292,20 +292,22 @@ EXPORT_SYMBOL_GPL(platform_device_add); | |||
292 | * @pdev: platform device we're removing | 292 | * @pdev: platform device we're removing |
293 | * | 293 | * |
294 | * Note that this function will also release all memory- and port-based | 294 | * Note that this function will also release all memory- and port-based |
295 | * resources owned by the device (@dev->resource). | 295 | * resources owned by the device (@dev->resource). This function |
296 | * must _only_ be externally called in error cases. All other usage | ||
297 | * is a bug. | ||
296 | */ | 298 | */ |
297 | void platform_device_del(struct platform_device *pdev) | 299 | void platform_device_del(struct platform_device *pdev) |
298 | { | 300 | { |
299 | int i; | 301 | int i; |
300 | 302 | ||
301 | if (pdev) { | 303 | if (pdev) { |
304 | device_del(&pdev->dev); | ||
305 | |||
302 | for (i = 0; i < pdev->num_resources; i++) { | 306 | for (i = 0; i < pdev->num_resources; i++) { |
303 | struct resource *r = &pdev->resource[i]; | 307 | struct resource *r = &pdev->resource[i]; |
304 | if (r->flags & (IORESOURCE_MEM|IORESOURCE_IO)) | 308 | if (r->flags & (IORESOURCE_MEM|IORESOURCE_IO)) |
305 | release_resource(r); | 309 | release_resource(r); |
306 | } | 310 | } |
307 | |||
308 | device_del(&pdev->dev); | ||
309 | } | 311 | } |
310 | } | 312 | } |
311 | EXPORT_SYMBOL_GPL(platform_device_del); | 313 | EXPORT_SYMBOL_GPL(platform_device_del); |
diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c index 58b6f77a1b34..a47ee1b70d20 100644 --- a/drivers/base/power/shutdown.c +++ b/drivers/base/power/shutdown.c | |||
@@ -16,8 +16,6 @@ | |||
16 | 16 | ||
17 | #define to_dev(node) container_of(node, struct device, kobj.entry) | 17 | #define to_dev(node) container_of(node, struct device, kobj.entry) |
18 | 18 | ||
19 | extern struct subsystem devices_subsys; | ||
20 | |||
21 | 19 | ||
22 | /** | 20 | /** |
23 | * We handle system devices differently - we suspend and shut them | 21 | * We handle system devices differently - we suspend and shut them |
@@ -36,7 +34,7 @@ void device_shutdown(void) | |||
36 | { | 34 | { |
37 | struct device * dev, *devn; | 35 | struct device * dev, *devn; |
38 | 36 | ||
39 | list_for_each_entry_safe_reverse(dev, devn, &devices_subsys.kset.list, | 37 | list_for_each_entry_safe_reverse(dev, devn, &devices_subsys.list, |
40 | kobj.entry) { | 38 | kobj.entry) { |
41 | if (dev->bus && dev->bus->shutdown) { | 39 | if (dev->bus && dev->bus->shutdown) { |
42 | dev_dbg(dev, "shutdown\n"); | 40 | dev_dbg(dev, "shutdown\n"); |
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 04e5db445c74..29f1291966c1 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #include "base.h" | 26 | #include "base.h" |
27 | 27 | ||
28 | extern struct subsystem devices_subsys; | 28 | extern struct kset devices_subsys; |
29 | 29 | ||
30 | #define to_sysdev(k) container_of(k, struct sys_device, kobj) | 30 | #define to_sysdev(k) container_of(k, struct sys_device, kobj) |
31 | #define to_sysdev_attr(a) container_of(a, struct sysdev_attribute, attr) | 31 | #define to_sysdev_attr(a) container_of(a, struct sysdev_attribute, attr) |
@@ -138,7 +138,7 @@ int sysdev_class_register(struct sysdev_class * cls) | |||
138 | pr_debug("Registering sysdev class '%s'\n", | 138 | pr_debug("Registering sysdev class '%s'\n", |
139 | kobject_name(&cls->kset.kobj)); | 139 | kobject_name(&cls->kset.kobj)); |
140 | INIT_LIST_HEAD(&cls->drivers); | 140 | INIT_LIST_HEAD(&cls->drivers); |
141 | cls->kset.subsys = &system_subsys; | 141 | cls->kset.kobj.parent = &system_subsys.kobj; |
142 | kset_set_kset_s(cls, system_subsys); | 142 | kset_set_kset_s(cls, system_subsys); |
143 | return kset_register(&cls->kset); | 143 | return kset_register(&cls->kset); |
144 | } | 144 | } |
@@ -309,7 +309,7 @@ void sysdev_shutdown(void) | |||
309 | pr_debug("Shutting Down System Devices\n"); | 309 | pr_debug("Shutting Down System Devices\n"); |
310 | 310 | ||
311 | down(&sysdev_drivers_lock); | 311 | down(&sysdev_drivers_lock); |
312 | list_for_each_entry_reverse(cls, &system_subsys.kset.list, | 312 | list_for_each_entry_reverse(cls, &system_subsys.list, |
313 | kset.kobj.entry) { | 313 | kset.kobj.entry) { |
314 | struct sys_device * sysdev; | 314 | struct sys_device * sysdev; |
315 | 315 | ||
@@ -384,7 +384,7 @@ int sysdev_suspend(pm_message_t state) | |||
384 | 384 | ||
385 | pr_debug("Suspending System Devices\n"); | 385 | pr_debug("Suspending System Devices\n"); |
386 | 386 | ||
387 | list_for_each_entry_reverse(cls, &system_subsys.kset.list, | 387 | list_for_each_entry_reverse(cls, &system_subsys.list, |
388 | kset.kobj.entry) { | 388 | kset.kobj.entry) { |
389 | 389 | ||
390 | pr_debug("Suspending type '%s':\n", | 390 | pr_debug("Suspending type '%s':\n", |
@@ -457,7 +457,7 @@ gbl_driver: | |||
457 | } | 457 | } |
458 | 458 | ||
459 | /* resume other classes */ | 459 | /* resume other classes */ |
460 | list_for_each_entry_continue(cls, &system_subsys.kset.list, | 460 | list_for_each_entry_continue(cls, &system_subsys.list, |
461 | kset.kobj.entry) { | 461 | kset.kobj.entry) { |
462 | list_for_each_entry(err_dev, &cls->kset.list, kobj.entry) { | 462 | list_for_each_entry(err_dev, &cls->kset.list, kobj.entry) { |
463 | pr_debug(" %s\n", kobject_name(&err_dev->kobj)); | 463 | pr_debug(" %s\n", kobject_name(&err_dev->kobj)); |
@@ -483,7 +483,7 @@ int sysdev_resume(void) | |||
483 | 483 | ||
484 | pr_debug("Resuming System Devices\n"); | 484 | pr_debug("Resuming System Devices\n"); |
485 | 485 | ||
486 | list_for_each_entry(cls, &system_subsys.kset.list, kset.kobj.entry) { | 486 | list_for_each_entry(cls, &system_subsys.list, kset.kobj.entry) { |
487 | struct sys_device * sysdev; | 487 | struct sys_device * sysdev; |
488 | 488 | ||
489 | pr_debug("Resuming type '%s':\n", | 489 | pr_debug("Resuming type '%s':\n", |
@@ -501,7 +501,7 @@ int sysdev_resume(void) | |||
501 | 501 | ||
502 | int __init system_bus_init(void) | 502 | int __init system_bus_init(void) |
503 | { | 503 | { |
504 | system_subsys.kset.kobj.parent = &devices_subsys.kset.kobj; | 504 | system_subsys.kobj.parent = &devices_subsys.kobj; |
505 | return subsystem_register(&system_subsys); | 505 | return subsystem_register(&system_subsys); |
506 | } | 506 | } |
507 | 507 | ||
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index c6281ccd4fe7..1324984a4c35 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -409,7 +409,7 @@ static struct kobj_type ktype_efivar = { | |||
409 | }; | 409 | }; |
410 | 410 | ||
411 | static ssize_t | 411 | static ssize_t |
412 | dummy(struct subsystem *sub, char *buf) | 412 | dummy(struct kset *kset, char *buf) |
413 | { | 413 | { |
414 | return -ENODEV; | 414 | return -ENODEV; |
415 | } | 415 | } |
@@ -422,7 +422,7 @@ efivar_unregister(struct efivar_entry *var) | |||
422 | 422 | ||
423 | 423 | ||
424 | static ssize_t | 424 | static ssize_t |
425 | efivar_create(struct subsystem *sub, const char *buf, size_t count) | 425 | efivar_create(struct kset *kset, const char *buf, size_t count) |
426 | { | 426 | { |
427 | struct efi_variable *new_var = (struct efi_variable *)buf; | 427 | struct efi_variable *new_var = (struct efi_variable *)buf; |
428 | struct efivar_entry *search_efivar, *n; | 428 | struct efivar_entry *search_efivar, *n; |
@@ -480,7 +480,7 @@ efivar_create(struct subsystem *sub, const char *buf, size_t count) | |||
480 | } | 480 | } |
481 | 481 | ||
482 | static ssize_t | 482 | static ssize_t |
483 | efivar_delete(struct subsystem *sub, const char *buf, size_t count) | 483 | efivar_delete(struct kset *kset, const char *buf, size_t count) |
484 | { | 484 | { |
485 | struct efi_variable *del_var = (struct efi_variable *)buf; | 485 | struct efi_variable *del_var = (struct efi_variable *)buf; |
486 | struct efivar_entry *search_efivar, *n; | 486 | struct efivar_entry *search_efivar, *n; |
@@ -551,11 +551,11 @@ static struct subsys_attribute *var_subsys_attrs[] = { | |||
551 | * the efivars driver | 551 | * the efivars driver |
552 | */ | 552 | */ |
553 | static ssize_t | 553 | static ssize_t |
554 | systab_read(struct subsystem *entry, char *buf) | 554 | systab_read(struct kset *kset, char *buf) |
555 | { | 555 | { |
556 | char *str = buf; | 556 | char *str = buf; |
557 | 557 | ||
558 | if (!entry || !buf) | 558 | if (!kset || !buf) |
559 | return -EINVAL; | 559 | return -EINVAL; |
560 | 560 | ||
561 | if (efi.mps != EFI_INVALID_TABLE_ADDR) | 561 | if (efi.mps != EFI_INVALID_TABLE_ADDR) |
@@ -687,7 +687,7 @@ efivars_init(void) | |||
687 | goto out_free; | 687 | goto out_free; |
688 | } | 688 | } |
689 | 689 | ||
690 | kset_set_kset_s(&vars_subsys, efi_subsys); | 690 | kobj_set_kset_s(&vars_subsys, efi_subsys); |
691 | 691 | ||
692 | error = subsystem_register(&vars_subsys); | 692 | error = subsystem_register(&vars_subsys); |
693 | 693 | ||
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 6439f378f6cc..6e55b2c5874e 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -650,7 +650,7 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct | |||
650 | dev->cdev.dev, evdev->name); | 650 | dev->cdev.dev, evdev->name); |
651 | 651 | ||
652 | /* temporary symlink to keep userspace happy */ | 652 | /* temporary symlink to keep userspace happy */ |
653 | sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj, | 653 | sysfs_create_link(&input_class.subsys.kobj, &cdev->kobj, |
654 | evdev->name); | 654 | evdev->name); |
655 | 655 | ||
656 | return &evdev->handle; | 656 | return &evdev->handle; |
@@ -661,7 +661,7 @@ static void evdev_disconnect(struct input_handle *handle) | |||
661 | struct evdev *evdev = handle->private; | 661 | struct evdev *evdev = handle->private; |
662 | struct evdev_list *list; | 662 | struct evdev_list *list; |
663 | 663 | ||
664 | sysfs_remove_link(&input_class.subsys.kset.kobj, evdev->name); | 664 | sysfs_remove_link(&input_class.subsys.kobj, evdev->name); |
665 | class_device_destroy(&input_class, | 665 | class_device_destroy(&input_class, |
666 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); | 666 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); |
667 | evdev->exist = 0; | 667 | evdev->exist = 0; |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 9f3529ad3fda..d2482e4f71be 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -539,7 +539,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct | |||
539 | dev->cdev.dev, joydev->name); | 539 | dev->cdev.dev, joydev->name); |
540 | 540 | ||
541 | /* temporary symlink to keep userspace happy */ | 541 | /* temporary symlink to keep userspace happy */ |
542 | sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj, | 542 | sysfs_create_link(&input_class.subsys.kobj, &cdev->kobj, |
543 | joydev->name); | 543 | joydev->name); |
544 | 544 | ||
545 | return &joydev->handle; | 545 | return &joydev->handle; |
@@ -550,7 +550,7 @@ static void joydev_disconnect(struct input_handle *handle) | |||
550 | struct joydev *joydev = handle->private; | 550 | struct joydev *joydev = handle->private; |
551 | struct joydev_list *list; | 551 | struct joydev_list *list; |
552 | 552 | ||
553 | sysfs_remove_link(&input_class.subsys.kset.kobj, joydev->name); | 553 | sysfs_remove_link(&input_class.subsys.kobj, joydev->name); |
554 | class_device_destroy(&input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); | 554 | class_device_destroy(&input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); |
555 | joydev->exist = 0; | 555 | joydev->exist = 0; |
556 | 556 | ||
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 664bcc8116fc..074fee429d1b 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -661,7 +661,7 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru | |||
661 | dev->cdev.dev, mousedev->name); | 661 | dev->cdev.dev, mousedev->name); |
662 | 662 | ||
663 | /* temporary symlink to keep userspace happy */ | 663 | /* temporary symlink to keep userspace happy */ |
664 | sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj, | 664 | sysfs_create_link(&input_class.subsys.kobj, &cdev->kobj, |
665 | mousedev->name); | 665 | mousedev->name); |
666 | 666 | ||
667 | return &mousedev->handle; | 667 | return &mousedev->handle; |
@@ -672,7 +672,7 @@ static void mousedev_disconnect(struct input_handle *handle) | |||
672 | struct mousedev *mousedev = handle->private; | 672 | struct mousedev *mousedev = handle->private; |
673 | struct mousedev_list *list; | 673 | struct mousedev_list *list; |
674 | 674 | ||
675 | sysfs_remove_link(&input_class.subsys.kset.kobj, mousedev->name); | 675 | sysfs_remove_link(&input_class.subsys.kobj, mousedev->name); |
676 | class_device_destroy(&input_class, | 676 | class_device_destroy(&input_class, |
677 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); | 677 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); |
678 | mousedev->exist = 0; | 678 | mousedev->exist = 0; |
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index 0300dca8591d..05dfc10bc079 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c | |||
@@ -420,7 +420,7 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, | |||
420 | dev->cdev.dev, tsdev->name); | 420 | dev->cdev.dev, tsdev->name); |
421 | 421 | ||
422 | /* temporary symlink to keep userspace happy */ | 422 | /* temporary symlink to keep userspace happy */ |
423 | sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj, | 423 | sysfs_create_link(&input_class.subsys.kobj, &cdev->kobj, |
424 | tsdev->name); | 424 | tsdev->name); |
425 | 425 | ||
426 | return &tsdev->handle; | 426 | return &tsdev->handle; |
@@ -431,7 +431,7 @@ static void tsdev_disconnect(struct input_handle *handle) | |||
431 | struct tsdev *tsdev = handle->private; | 431 | struct tsdev *tsdev = handle->private; |
432 | struct tsdev_list *list; | 432 | struct tsdev_list *list; |
433 | 433 | ||
434 | sysfs_remove_link(&input_class.subsys.kset.kobj, tsdev->name); | 434 | sysfs_remove_link(&input_class.subsys.kobj, tsdev->name); |
435 | class_device_destroy(&input_class, | 435 | class_device_destroy(&input_class, |
436 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | 436 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); |
437 | tsdev->exist = 0; | 437 | tsdev->exist = 0; |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index ea1b7a63598e..815e445c3125 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -520,17 +520,17 @@ static struct pdcspath_entry *pdcspath_entries[] = { | |||
520 | 520 | ||
521 | /** | 521 | /** |
522 | * pdcs_size_read - Stable Storage size output. | 522 | * pdcs_size_read - Stable Storage size output. |
523 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 523 | * @kset: An allocated and populated struct kset. We don't use it tho. |
524 | * @buf: The output buffer to write to. | 524 | * @buf: The output buffer to write to. |
525 | */ | 525 | */ |
526 | static ssize_t | 526 | static ssize_t |
527 | pdcs_size_read(struct subsystem *entry, char *buf) | 527 | pdcs_size_read(struct kset *kset, char *buf) |
528 | { | 528 | { |
529 | char *out = buf; | 529 | char *out = buf; |
530 | 530 | ||
531 | if (!entry || !buf) | 531 | if (!kset || !buf) |
532 | return -EINVAL; | 532 | return -EINVAL; |
533 | 533 | ||
534 | /* show the size of the stable storage */ | 534 | /* show the size of the stable storage */ |
535 | out += sprintf(out, "%ld\n", pdcs_size); | 535 | out += sprintf(out, "%ld\n", pdcs_size); |
536 | 536 | ||
@@ -539,17 +539,17 @@ pdcs_size_read(struct subsystem *entry, char *buf) | |||
539 | 539 | ||
540 | /** | 540 | /** |
541 | * pdcs_auto_read - Stable Storage autoboot/search flag output. | 541 | * pdcs_auto_read - Stable Storage autoboot/search flag output. |
542 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 542 | * @kset: An allocated and populated struct kset. We don't use it tho. |
543 | * @buf: The output buffer to write to. | 543 | * @buf: The output buffer to write to. |
544 | * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag | 544 | * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag |
545 | */ | 545 | */ |
546 | static ssize_t | 546 | static ssize_t |
547 | pdcs_auto_read(struct subsystem *entry, char *buf, int knob) | 547 | pdcs_auto_read(struct kset *kset, char *buf, int knob) |
548 | { | 548 | { |
549 | char *out = buf; | 549 | char *out = buf; |
550 | struct pdcspath_entry *pathentry; | 550 | struct pdcspath_entry *pathentry; |
551 | 551 | ||
552 | if (!entry || !buf) | 552 | if (!kset || !buf) |
553 | return -EINVAL; | 553 | return -EINVAL; |
554 | 554 | ||
555 | /* Current flags are stored in primary boot path entry */ | 555 | /* Current flags are stored in primary boot path entry */ |
@@ -565,40 +565,40 @@ pdcs_auto_read(struct subsystem *entry, char *buf, int knob) | |||
565 | 565 | ||
566 | /** | 566 | /** |
567 | * pdcs_autoboot_read - Stable Storage autoboot flag output. | 567 | * pdcs_autoboot_read - Stable Storage autoboot flag output. |
568 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 568 | * @kset: An allocated and populated struct kset. We don't use it tho. |
569 | * @buf: The output buffer to write to. | 569 | * @buf: The output buffer to write to. |
570 | */ | 570 | */ |
571 | static inline ssize_t | 571 | static inline ssize_t |
572 | pdcs_autoboot_read(struct subsystem *entry, char *buf) | 572 | pdcs_autoboot_read(struct kset *kset, char *buf) |
573 | { | 573 | { |
574 | return pdcs_auto_read(entry, buf, PF_AUTOBOOT); | 574 | return pdcs_auto_read(kset, buf, PF_AUTOBOOT); |
575 | } | 575 | } |
576 | 576 | ||
577 | /** | 577 | /** |
578 | * pdcs_autosearch_read - Stable Storage autoboot flag output. | 578 | * pdcs_autosearch_read - Stable Storage autoboot flag output. |
579 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 579 | * @kset: An allocated and populated struct kset. We don't use it tho. |
580 | * @buf: The output buffer to write to. | 580 | * @buf: The output buffer to write to. |
581 | */ | 581 | */ |
582 | static inline ssize_t | 582 | static inline ssize_t |
583 | pdcs_autosearch_read(struct subsystem *entry, char *buf) | 583 | pdcs_autosearch_read(struct kset *kset, char *buf) |
584 | { | 584 | { |
585 | return pdcs_auto_read(entry, buf, PF_AUTOSEARCH); | 585 | return pdcs_auto_read(kset, buf, PF_AUTOSEARCH); |
586 | } | 586 | } |
587 | 587 | ||
588 | /** | 588 | /** |
589 | * pdcs_timer_read - Stable Storage timer count output (in seconds). | 589 | * pdcs_timer_read - Stable Storage timer count output (in seconds). |
590 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 590 | * @kset: An allocated and populated struct kset. We don't use it tho. |
591 | * @buf: The output buffer to write to. | 591 | * @buf: The output buffer to write to. |
592 | * | 592 | * |
593 | * The value of the timer field correponds to a number of seconds in powers of 2. | 593 | * The value of the timer field correponds to a number of seconds in powers of 2. |
594 | */ | 594 | */ |
595 | static ssize_t | 595 | static ssize_t |
596 | pdcs_timer_read(struct subsystem *entry, char *buf) | 596 | pdcs_timer_read(struct kset *kset, char *buf) |
597 | { | 597 | { |
598 | char *out = buf; | 598 | char *out = buf; |
599 | struct pdcspath_entry *pathentry; | 599 | struct pdcspath_entry *pathentry; |
600 | 600 | ||
601 | if (!entry || !buf) | 601 | if (!kset || !buf) |
602 | return -EINVAL; | 602 | return -EINVAL; |
603 | 603 | ||
604 | /* Current flags are stored in primary boot path entry */ | 604 | /* Current flags are stored in primary boot path entry */ |
@@ -615,15 +615,15 @@ pdcs_timer_read(struct subsystem *entry, char *buf) | |||
615 | 615 | ||
616 | /** | 616 | /** |
617 | * pdcs_osid_read - Stable Storage OS ID register output. | 617 | * pdcs_osid_read - Stable Storage OS ID register output. |
618 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 618 | * @kset: An allocated and populated struct kset. We don't use it tho. |
619 | * @buf: The output buffer to write to. | 619 | * @buf: The output buffer to write to. |
620 | */ | 620 | */ |
621 | static ssize_t | 621 | static ssize_t |
622 | pdcs_osid_read(struct subsystem *entry, char *buf) | 622 | pdcs_osid_read(struct kset *kset, char *buf) |
623 | { | 623 | { |
624 | char *out = buf; | 624 | char *out = buf; |
625 | 625 | ||
626 | if (!entry || !buf) | 626 | if (!kset || !buf) |
627 | return -EINVAL; | 627 | return -EINVAL; |
628 | 628 | ||
629 | out += sprintf(out, "%s dependent data (0x%.4x)\n", | 629 | out += sprintf(out, "%s dependent data (0x%.4x)\n", |
@@ -634,18 +634,18 @@ pdcs_osid_read(struct subsystem *entry, char *buf) | |||
634 | 634 | ||
635 | /** | 635 | /** |
636 | * pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output. | 636 | * pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output. |
637 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 637 | * @kset: An allocated and populated struct kset. We don't use it tho. |
638 | * @buf: The output buffer to write to. | 638 | * @buf: The output buffer to write to. |
639 | * | 639 | * |
640 | * This can hold 16 bytes of OS-Dependent data. | 640 | * This can hold 16 bytes of OS-Dependent data. |
641 | */ | 641 | */ |
642 | static ssize_t | 642 | static ssize_t |
643 | pdcs_osdep1_read(struct subsystem *entry, char *buf) | 643 | pdcs_osdep1_read(struct kset *kset, char *buf) |
644 | { | 644 | { |
645 | char *out = buf; | 645 | char *out = buf; |
646 | u32 result[4]; | 646 | u32 result[4]; |
647 | 647 | ||
648 | if (!entry || !buf) | 648 | if (!kset || !buf) |
649 | return -EINVAL; | 649 | return -EINVAL; |
650 | 650 | ||
651 | if (pdc_stable_read(PDCS_ADDR_OSD1, &result, sizeof(result)) != PDC_OK) | 651 | if (pdc_stable_read(PDCS_ADDR_OSD1, &result, sizeof(result)) != PDC_OK) |
@@ -661,18 +661,18 @@ pdcs_osdep1_read(struct subsystem *entry, char *buf) | |||
661 | 661 | ||
662 | /** | 662 | /** |
663 | * pdcs_diagnostic_read - Stable Storage Diagnostic register output. | 663 | * pdcs_diagnostic_read - Stable Storage Diagnostic register output. |
664 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 664 | * @kset: An allocated and populated struct kset. We don't use it tho. |
665 | * @buf: The output buffer to write to. | 665 | * @buf: The output buffer to write to. |
666 | * | 666 | * |
667 | * I have NFC how to interpret the content of that register ;-). | 667 | * I have NFC how to interpret the content of that register ;-). |
668 | */ | 668 | */ |
669 | static ssize_t | 669 | static ssize_t |
670 | pdcs_diagnostic_read(struct subsystem *entry, char *buf) | 670 | pdcs_diagnostic_read(struct kset *kset, char *buf) |
671 | { | 671 | { |
672 | char *out = buf; | 672 | char *out = buf; |
673 | u32 result; | 673 | u32 result; |
674 | 674 | ||
675 | if (!entry || !buf) | 675 | if (!kset || !buf) |
676 | return -EINVAL; | 676 | return -EINVAL; |
677 | 677 | ||
678 | /* get diagnostic */ | 678 | /* get diagnostic */ |
@@ -686,18 +686,18 @@ pdcs_diagnostic_read(struct subsystem *entry, char *buf) | |||
686 | 686 | ||
687 | /** | 687 | /** |
688 | * pdcs_fastsize_read - Stable Storage FastSize register output. | 688 | * pdcs_fastsize_read - Stable Storage FastSize register output. |
689 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 689 | * @kset: An allocated and populated struct kset. We don't use it tho. |
690 | * @buf: The output buffer to write to. | 690 | * @buf: The output buffer to write to. |
691 | * | 691 | * |
692 | * This register holds the amount of system RAM to be tested during boot sequence. | 692 | * This register holds the amount of system RAM to be tested during boot sequence. |
693 | */ | 693 | */ |
694 | static ssize_t | 694 | static ssize_t |
695 | pdcs_fastsize_read(struct subsystem *entry, char *buf) | 695 | pdcs_fastsize_read(struct kset *kset, char *buf) |
696 | { | 696 | { |
697 | char *out = buf; | 697 | char *out = buf; |
698 | u32 result; | 698 | u32 result; |
699 | 699 | ||
700 | if (!entry || !buf) | 700 | if (!kset || !buf) |
701 | return -EINVAL; | 701 | return -EINVAL; |
702 | 702 | ||
703 | /* get fast-size */ | 703 | /* get fast-size */ |
@@ -715,13 +715,13 @@ pdcs_fastsize_read(struct subsystem *entry, char *buf) | |||
715 | 715 | ||
716 | /** | 716 | /** |
717 | * pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output. | 717 | * pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output. |
718 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 718 | * @kset: An allocated and populated struct kset. We don't use it tho. |
719 | * @buf: The output buffer to write to. | 719 | * @buf: The output buffer to write to. |
720 | * | 720 | * |
721 | * This can hold pdcs_size - 224 bytes of OS-Dependent data, when available. | 721 | * This can hold pdcs_size - 224 bytes of OS-Dependent data, when available. |
722 | */ | 722 | */ |
723 | static ssize_t | 723 | static ssize_t |
724 | pdcs_osdep2_read(struct subsystem *entry, char *buf) | 724 | pdcs_osdep2_read(struct kset *kset, char *buf) |
725 | { | 725 | { |
726 | char *out = buf; | 726 | char *out = buf; |
727 | unsigned long size; | 727 | unsigned long size; |
@@ -733,7 +733,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf) | |||
733 | 733 | ||
734 | size = pdcs_size - 224; | 734 | size = pdcs_size - 224; |
735 | 735 | ||
736 | if (!entry || !buf) | 736 | if (!kset || !buf) |
737 | return -EINVAL; | 737 | return -EINVAL; |
738 | 738 | ||
739 | for (i=0; i<size; i+=4) { | 739 | for (i=0; i<size; i+=4) { |
@@ -748,7 +748,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf) | |||
748 | 748 | ||
749 | /** | 749 | /** |
750 | * pdcs_auto_write - This function handles autoboot/search flag modifying. | 750 | * pdcs_auto_write - This function handles autoboot/search flag modifying. |
751 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 751 | * @kset: An allocated and populated struct kset. We don't use it tho. |
752 | * @buf: The input buffer to read from. | 752 | * @buf: The input buffer to read from. |
753 | * @count: The number of bytes to be read. | 753 | * @count: The number of bytes to be read. |
754 | * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag | 754 | * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag |
@@ -758,7 +758,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf) | |||
758 | * \"n\" (n == 0 or 1) to toggle AutoBoot Off or On | 758 | * \"n\" (n == 0 or 1) to toggle AutoBoot Off or On |
759 | */ | 759 | */ |
760 | static ssize_t | 760 | static ssize_t |
761 | pdcs_auto_write(struct subsystem *entry, const char *buf, size_t count, int knob) | 761 | pdcs_auto_write(struct kset *kset, const char *buf, size_t count, int knob) |
762 | { | 762 | { |
763 | struct pdcspath_entry *pathentry; | 763 | struct pdcspath_entry *pathentry; |
764 | unsigned char flags; | 764 | unsigned char flags; |
@@ -768,7 +768,7 @@ pdcs_auto_write(struct subsystem *entry, const char *buf, size_t count, int knob | |||
768 | if (!capable(CAP_SYS_ADMIN)) | 768 | if (!capable(CAP_SYS_ADMIN)) |
769 | return -EACCES; | 769 | return -EACCES; |
770 | 770 | ||
771 | if (!entry || !buf || !count) | 771 | if (!kset || !buf || !count) |
772 | return -EINVAL; | 772 | return -EINVAL; |
773 | 773 | ||
774 | /* We'll use a local copy of buf */ | 774 | /* We'll use a local copy of buf */ |
@@ -823,7 +823,7 @@ parse_error: | |||
823 | 823 | ||
824 | /** | 824 | /** |
825 | * pdcs_autoboot_write - This function handles autoboot flag modifying. | 825 | * pdcs_autoboot_write - This function handles autoboot flag modifying. |
826 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 826 | * @kset: An allocated and populated struct kset. We don't use it tho. |
827 | * @buf: The input buffer to read from. | 827 | * @buf: The input buffer to read from. |
828 | * @count: The number of bytes to be read. | 828 | * @count: The number of bytes to be read. |
829 | * | 829 | * |
@@ -832,14 +832,14 @@ parse_error: | |||
832 | * \"n\" (n == 0 or 1) to toggle AutoSearch Off or On | 832 | * \"n\" (n == 0 or 1) to toggle AutoSearch Off or On |
833 | */ | 833 | */ |
834 | static inline ssize_t | 834 | static inline ssize_t |
835 | pdcs_autoboot_write(struct subsystem *entry, const char *buf, size_t count) | 835 | pdcs_autoboot_write(struct kset *kset, const char *buf, size_t count) |
836 | { | 836 | { |
837 | return pdcs_auto_write(entry, buf, count, PF_AUTOBOOT); | 837 | return pdcs_auto_write(kset, buf, count, PF_AUTOBOOT); |
838 | } | 838 | } |
839 | 839 | ||
840 | /** | 840 | /** |
841 | * pdcs_autosearch_write - This function handles autosearch flag modifying. | 841 | * pdcs_autosearch_write - This function handles autosearch flag modifying. |
842 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 842 | * @kset: An allocated and populated struct kset. We don't use it tho. |
843 | * @buf: The input buffer to read from. | 843 | * @buf: The input buffer to read from. |
844 | * @count: The number of bytes to be read. | 844 | * @count: The number of bytes to be read. |
845 | * | 845 | * |
@@ -848,14 +848,14 @@ pdcs_autoboot_write(struct subsystem *entry, const char *buf, size_t count) | |||
848 | * \"n\" (n == 0 or 1) to toggle AutoSearch Off or On | 848 | * \"n\" (n == 0 or 1) to toggle AutoSearch Off or On |
849 | */ | 849 | */ |
850 | static inline ssize_t | 850 | static inline ssize_t |
851 | pdcs_autosearch_write(struct subsystem *entry, const char *buf, size_t count) | 851 | pdcs_autosearch_write(struct kset *kset, const char *buf, size_t count) |
852 | { | 852 | { |
853 | return pdcs_auto_write(entry, buf, count, PF_AUTOSEARCH); | 853 | return pdcs_auto_write(kset, buf, count, PF_AUTOSEARCH); |
854 | } | 854 | } |
855 | 855 | ||
856 | /** | 856 | /** |
857 | * pdcs_osdep1_write - Stable Storage OS-Dependent data area 1 input. | 857 | * pdcs_osdep1_write - Stable Storage OS-Dependent data area 1 input. |
858 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 858 | * @kset: An allocated and populated struct kset. We don't use it tho. |
859 | * @buf: The input buffer to read from. | 859 | * @buf: The input buffer to read from. |
860 | * @count: The number of bytes to be read. | 860 | * @count: The number of bytes to be read. |
861 | * | 861 | * |
@@ -864,14 +864,14 @@ pdcs_autosearch_write(struct subsystem *entry, const char *buf, size_t count) | |||
864 | * its input buffer. | 864 | * its input buffer. |
865 | */ | 865 | */ |
866 | static ssize_t | 866 | static ssize_t |
867 | pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count) | 867 | pdcs_osdep1_write(struct kset *kset, const char *buf, size_t count) |
868 | { | 868 | { |
869 | u8 in[16]; | 869 | u8 in[16]; |
870 | 870 | ||
871 | if (!capable(CAP_SYS_ADMIN)) | 871 | if (!capable(CAP_SYS_ADMIN)) |
872 | return -EACCES; | 872 | return -EACCES; |
873 | 873 | ||
874 | if (!entry || !buf || !count) | 874 | if (!kset || !buf || !count) |
875 | return -EINVAL; | 875 | return -EINVAL; |
876 | 876 | ||
877 | if (unlikely(pdcs_osid != OS_ID_LINUX)) | 877 | if (unlikely(pdcs_osid != OS_ID_LINUX)) |
@@ -892,7 +892,7 @@ pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count) | |||
892 | 892 | ||
893 | /** | 893 | /** |
894 | * pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input. | 894 | * pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input. |
895 | * @entry: An allocated and populated subsytem struct. We don't use it tho. | 895 | * @kset: An allocated and populated struct kset. We don't use it tho. |
896 | * @buf: The input buffer to read from. | 896 | * @buf: The input buffer to read from. |
897 | * @count: The number of bytes to be read. | 897 | * @count: The number of bytes to be read. |
898 | * | 898 | * |
@@ -901,7 +901,7 @@ pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count) | |||
901 | * constructing its input buffer. | 901 | * constructing its input buffer. |
902 | */ | 902 | */ |
903 | static ssize_t | 903 | static ssize_t |
904 | pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count) | 904 | pdcs_osdep2_write(struct kset *kset, const char *buf, size_t count) |
905 | { | 905 | { |
906 | unsigned long size; | 906 | unsigned long size; |
907 | unsigned short i; | 907 | unsigned short i; |
@@ -910,7 +910,7 @@ pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count) | |||
910 | if (!capable(CAP_SYS_ADMIN)) | 910 | if (!capable(CAP_SYS_ADMIN)) |
911 | return -EACCES; | 911 | return -EACCES; |
912 | 912 | ||
913 | if (!entry || !buf || !count) | 913 | if (!kset || !buf || !count) |
914 | return -EINVAL; | 914 | return -EINVAL; |
915 | 915 | ||
916 | if (unlikely(pdcs_size <= 224)) | 916 | if (unlikely(pdcs_size <= 224)) |
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index 7f03881a8b68..e7322c25d377 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c | |||
@@ -424,7 +424,7 @@ static int __init ibm_acpiphp_init(void) | |||
424 | int retval = 0; | 424 | int retval = 0; |
425 | acpi_status status; | 425 | acpi_status status; |
426 | struct acpi_device *device; | 426 | struct acpi_device *device; |
427 | struct kobject *sysdir = &pci_hotplug_slots_subsys.kset.kobj; | 427 | struct kobject *sysdir = &pci_hotplug_slots_subsys.kobj; |
428 | 428 | ||
429 | dbg("%s\n", __FUNCTION__); | 429 | dbg("%s\n", __FUNCTION__); |
430 | 430 | ||
@@ -471,7 +471,7 @@ init_return: | |||
471 | static void __exit ibm_acpiphp_exit(void) | 471 | static void __exit ibm_acpiphp_exit(void) |
472 | { | 472 | { |
473 | acpi_status status; | 473 | acpi_status status; |
474 | struct kobject *sysdir = &pci_hotplug_slots_subsys.kset.kobj; | 474 | struct kobject *sysdir = &pci_hotplug_slots_subsys.kobj; |
475 | 475 | ||
476 | dbg("%s\n", __FUNCTION__); | 476 | dbg("%s\n", __FUNCTION__); |
477 | 477 | ||
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index f5d632e72323..63f3bd1eecc4 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -62,7 +62,7 @@ static int debug; | |||
62 | 62 | ||
63 | static LIST_HEAD(pci_hotplug_slot_list); | 63 | static LIST_HEAD(pci_hotplug_slot_list); |
64 | 64 | ||
65 | struct subsystem pci_hotplug_slots_subsys; | 65 | struct kset pci_hotplug_slots_subsys; |
66 | 66 | ||
67 | static ssize_t hotplug_slot_attr_show(struct kobject *kobj, | 67 | static ssize_t hotplug_slot_attr_show(struct kobject *kobj, |
68 | struct attribute *attr, char *buf) | 68 | struct attribute *attr, char *buf) |
@@ -764,7 +764,7 @@ static int __init pci_hotplug_init (void) | |||
764 | { | 764 | { |
765 | int result; | 765 | int result; |
766 | 766 | ||
767 | kset_set_kset_s(&pci_hotplug_slots_subsys, pci_bus_type.subsys); | 767 | kobj_set_kset_s(&pci_hotplug_slots_subsys, pci_bus_type.subsys); |
768 | result = subsystem_register(&pci_hotplug_slots_subsys); | 768 | result = subsystem_register(&pci_hotplug_slots_subsys); |
769 | if (result) { | 769 | if (result) { |
770 | err("Register subsys with error %d\n", result); | 770 | err("Register subsys with error %d\n", result); |