aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-04-13 16:15:19 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 21:57:59 -0400
commit823bccfc4002296ba88c3ad0f049e1abd8108d30 (patch)
tree5338ae0b32409446af4cd00c5107d9405d5bf0b6 /drivers
parent2609e7b9bebfd433254c02538ba803dc516ff674 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/base.h2
-rw-r--r--drivers/base/bus.c16
-rw-r--r--drivers/base/class.c18
-rw-r--r--drivers/base/core.c22
-rw-r--r--drivers/base/firmware.c6
-rw-r--r--drivers/base/power/shutdown.c4
-rw-r--r--drivers/base/sys.c14
-rw-r--r--drivers/firmware/efivars.c12
-rw-r--r--drivers/input/evdev.c4
-rw-r--r--drivers/input/joydev.c4
-rw-r--r--drivers/input/mousedev.c4
-rw-r--r--drivers/input/tsdev.c4
-rw-r--r--drivers/parisc/pdc_stable.c94
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c4
-rw-r--r--drivers/pci/hotplug/pci_hotplug_core.c4
15 files changed, 105 insertions, 107 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)
45extern char *make_class_name(const char *name, struct kobject *kobj); 45extern char *make_class_name(const char *name, struct kobject *kobj);
46 46
47extern void devres_release_all(struct device *dev); 47extern void devres_release_all(struct device *dev);
48
49extern 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)
133void bus_remove_file(struct bus_type * bus, struct bus_attribute * attr) 133void 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)
397static int make_deprecated_bus_links(struct device *dev) 397static 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
403static void remove_deprecated_bus_links(struct device *dev) 403static 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
22extern 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
27static ssize_t 25static ssize_t
28class_attr_show(struct kobject * kobj, struct attribute * attr, char * buf) 26class_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)
89void class_remove_file(struct class * cls, const struct class_attribute * attr) 87void 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
95static struct class *class_get(struct class *cls) 93static 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 59d9816c332e..b78fc1e68264 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -565,7 +565,7 @@ static struct kobject * get_device_parent(struct device *dev,
565 /* Set the parent to the class, not the parent device */ 565 /* Set the parent to the class, not the parent device */
566 /* 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 */
567 if (dev->class) 567 if (dev->class)
568 return &dev->class->subsys.kset.kobj; 568 return &dev->class->subsys.kobj;
569 else if (parent) 569 else if (parent)
570 return &parent->kobj; 570 return &parent->kobj;
571 571
@@ -577,7 +577,7 @@ static struct kobject *virtual_device_parent(struct device *dev)
577 static struct kobject *virtual_dir = NULL; 577 static struct kobject *virtual_dir = NULL;
578 578
579 if (!virtual_dir) 579 if (!virtual_dir)
580 virtual_dir = kobject_add_dir(&devices_subsys.kset.kobj, "virtual"); 580 virtual_dir = kobject_add_dir(&devices_subsys.kobj, "virtual");
581 581
582 return virtual_dir; 582 return virtual_dir;
583} 583}
@@ -711,12 +711,12 @@ int device_add(struct device *dev)
711 } 711 }
712 712
713 if (dev->class) { 713 if (dev->class) {
714 sysfs_create_link(&dev->kobj, &dev->class->subsys.kset.kobj, 714 sysfs_create_link(&dev->kobj, &dev->class->subsys.kobj,
715 "subsystem"); 715 "subsystem");
716 /* If this is not a "fake" compatible device, then create the 716 /* If this is not a "fake" compatible device, then create the
717 * symlink from the class to the device. */ 717 * symlink from the class to the device. */
718 if (dev->kobj.parent != &dev->class->subsys.kset.kobj) 718 if (dev->kobj.parent != &dev->class->subsys.kobj)
719 sysfs_create_link(&dev->class->subsys.kset.kobj, 719 sysfs_create_link(&dev->class->subsys.kobj,
720 &dev->kobj, dev->bus_id); 720 &dev->kobj, dev->bus_id);
721 if (parent) { 721 if (parent) {
722 sysfs_create_link(&dev->kobj, &dev->parent->kobj, 722 sysfs_create_link(&dev->kobj, &dev->parent->kobj,
@@ -774,8 +774,8 @@ int device_add(struct device *dev)
774 sysfs_remove_link(&dev->kobj, "subsystem"); 774 sysfs_remove_link(&dev->kobj, "subsystem");
775 /* If this is not a "fake" compatible device, remove the 775 /* If this is not a "fake" compatible device, remove the
776 * symlink from the class to the device. */ 776 * symlink from the class to the device. */
777 if (dev->kobj.parent != &dev->class->subsys.kset.kobj) 777 if (dev->kobj.parent != &dev->class->subsys.kobj)
778 sysfs_remove_link(&dev->class->subsys.kset.kobj, 778 sysfs_remove_link(&dev->class->subsys.kobj,
779 dev->bus_id); 779 dev->bus_id);
780 if (parent) { 780 if (parent) {
781#ifdef CONFIG_SYSFS_DEPRECATED 781#ifdef CONFIG_SYSFS_DEPRECATED
@@ -875,8 +875,8 @@ void device_del(struct device * dev)
875 sysfs_remove_link(&dev->kobj, "subsystem"); 875 sysfs_remove_link(&dev->kobj, "subsystem");
876 /* If this is not a "fake" compatible device, remove the 876 /* If this is not a "fake" compatible device, remove the
877 * symlink from the class to the device. */ 877 * symlink from the class to the device. */
878 if (dev->kobj.parent != &dev->class->subsys.kset.kobj) 878 if (dev->kobj.parent != &dev->class->subsys.kobj)
879 sysfs_remove_link(&dev->class->subsys.kset.kobj, 879 sysfs_remove_link(&dev->class->subsys.kobj,
880 dev->bus_id); 880 dev->bus_id);
881 if (parent) { 881 if (parent) {
882#ifdef CONFIG_SYSFS_DEPRECATED 882#ifdef CONFIG_SYSFS_DEPRECATED
@@ -1192,9 +1192,9 @@ int device_rename(struct device *dev, char *new_name)
1192#endif 1192#endif
1193 1193
1194 if (dev->class) { 1194 if (dev->class) {
1195 sysfs_remove_link(&dev->class->subsys.kset.kobj, 1195 sysfs_remove_link(&dev->class->subsys.kobj,
1196 old_symlink_name); 1196 old_symlink_name);
1197 sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj, 1197 sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
1198 dev->bus_id); 1198 dev->bus_id);
1199 } 1199 }
1200 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
18static decl_subsys(firmware, NULL, NULL); 18static decl_subsys(firmware, NULL, NULL);
19 19
20int firmware_register(struct subsystem * s) 20int 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
26void firmware_unregister(struct subsystem * s) 26void firmware_unregister(struct kset *s)
27{ 27{
28 subsystem_unregister(s); 28 subsystem_unregister(s);
29} 29}
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
19extern 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
28extern struct subsystem devices_subsys; 28extern 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
502int __init system_bus_init(void) 502int __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
411static ssize_t 411static ssize_t
412dummy(struct subsystem *sub, char *buf) 412dummy(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
424static ssize_t 424static ssize_t
425efivar_create(struct subsystem *sub, const char *buf, size_t count) 425efivar_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
482static ssize_t 482static ssize_t
483efivar_delete(struct subsystem *sub, const char *buf, size_t count) 483efivar_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 */
553static ssize_t 553static ssize_t
554systab_read(struct subsystem *entry, char *buf) 554systab_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 */
526static ssize_t 526static ssize_t
527pdcs_size_read(struct subsystem *entry, char *buf) 527pdcs_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 */
546static ssize_t 546static ssize_t
547pdcs_auto_read(struct subsystem *entry, char *buf, int knob) 547pdcs_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 */
571static inline ssize_t 571static inline ssize_t
572pdcs_autoboot_read(struct subsystem *entry, char *buf) 572pdcs_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 */
582static inline ssize_t 582static inline ssize_t
583pdcs_autosearch_read(struct subsystem *entry, char *buf) 583pdcs_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 */
595static ssize_t 595static ssize_t
596pdcs_timer_read(struct subsystem *entry, char *buf) 596pdcs_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 */
621static ssize_t 621static ssize_t
622pdcs_osid_read(struct subsystem *entry, char *buf) 622pdcs_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 */
642static ssize_t 642static ssize_t
643pdcs_osdep1_read(struct subsystem *entry, char *buf) 643pdcs_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 */
669static ssize_t 669static ssize_t
670pdcs_diagnostic_read(struct subsystem *entry, char *buf) 670pdcs_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 */
694static ssize_t 694static ssize_t
695pdcs_fastsize_read(struct subsystem *entry, char *buf) 695pdcs_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 */
723static ssize_t 723static ssize_t
724pdcs_osdep2_read(struct subsystem *entry, char *buf) 724pdcs_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 */
760static ssize_t 760static ssize_t
761pdcs_auto_write(struct subsystem *entry, const char *buf, size_t count, int knob) 761pdcs_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 */
834static inline ssize_t 834static inline ssize_t
835pdcs_autoboot_write(struct subsystem *entry, const char *buf, size_t count) 835pdcs_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 */
850static inline ssize_t 850static inline ssize_t
851pdcs_autosearch_write(struct subsystem *entry, const char *buf, size_t count) 851pdcs_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 */
866static ssize_t 866static ssize_t
867pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count) 867pdcs_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 */
903static ssize_t 903static ssize_t
904pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count) 904pdcs_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:
471static void __exit ibm_acpiphp_exit(void) 471static 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
63static LIST_HEAD(pci_hotplug_slot_list); 63static LIST_HEAD(pci_hotplug_slot_list);
64 64
65struct subsystem pci_hotplug_slots_subsys; 65struct kset pci_hotplug_slots_subsys;
66 66
67static ssize_t hotplug_slot_attr_show(struct kobject *kobj, 67static 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);