aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 11:34:42 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 11:35:13 -0500
commitdf8dc74e8a383eaf2d9b44b80a71ec6f0e52b42e (patch)
treebc3799a43e8b94fa84b32e37b1c124d5e4868f50 /arch/s390
parent556a169dab38b5100df6f4a45b655dddd3db94c1 (diff)
parent4a3ad20ccd8f4d2a0535cf98fa83f7b561ba59a9 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
This can be broken down into these major areas: - Documentation updates (language translations and fixes, as well as kobject and kset documenatation updates.) - major kset/kobject/ktype rework and fixes. This cleans up the kset and kobject and ktype relationship and architecture, making sense of things now, and good documenation and samples are provided for others to use. Also the attributes for kobjects are much easier to handle now. This cleaned up a LOT of code all through the kernel, making kobjects easier to use if you want to. - struct bus_type has been reworked to now handle the lifetime rules properly, as the kobject is properly dynamic. - struct driver has also been reworked, and now the lifetime issues are resolved. - the block subsystem has been converted to use struct device now, and not "raw" kobjects. This patch has been in the -mm tree for over a year now, and finally all the issues are worked out with it. Older distros now properly work with new kernels, and no userspace updates are needed at all. - nozomi driver is added. This has also been in -mm for a long time, and many people have asked for it to go in. It is now in good enough shape to do so. - lots of class_device conversions to use struct device instead. The tree is almost all cleaned up now, only SCSI and IB is the remaining code to fix up... * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (196 commits) Driver core: coding style fixes Kobject: fix coding style issues in kobject c files Kobject: fix coding style issues in kobject.h Driver core: fix coding style issues in device.h spi: use class iteration api scsi: use class iteration api rtc: use class iteration api power supply : use class iteration api ieee1394: use class iteration api Driver Core: add class iteration api Driver core: Cleanup get_device_parent() in device_add() and device_move() UIO: constify function pointer tables Driver Core: constify the name passed to platform_device_register_simple driver core: fix build with SYSFS=n sysfs: make SYSFS_DEPRECATED depend on SYSFS Driver core: use LIST_HEAD instead of call to INIT_LIST_HEAD in __init kobject: add sample code for how to use ksets/ktypes/kobjects kobject: add sample code for how to use kobjects in a simple manner. kobject: update the kobject/kset documentation kobject: remove old, outdated documentation. ...
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/hypfs/inode.c13
-rw-r--r--arch/s390/kernel/ipl.c147
-rw-r--r--arch/s390/kernel/time.c2
3 files changed, 90 insertions, 72 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 5245717295b8..4b010ff814c9 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -490,7 +490,7 @@ static struct super_operations hypfs_s_ops = {
490 .show_options = hypfs_show_options, 490 .show_options = hypfs_show_options,
491}; 491};
492 492
493static decl_subsys(s390, NULL, NULL); 493static struct kobject *s390_kobj;
494 494
495static int __init hypfs_init(void) 495static int __init hypfs_init(void)
496{ 496{
@@ -506,17 +506,18 @@ static int __init hypfs_init(void)
506 goto fail_diag; 506 goto fail_diag;
507 } 507 }
508 } 508 }
509 kobj_set_kset_s(&s390_subsys, hypervisor_subsys); 509 s390_kobj = kobject_create_and_add("s390", hypervisor_kobj);
510 rc = subsystem_register(&s390_subsys); 510 if (!s390_kobj) {
511 if (rc) 511 rc = -ENOMEM;;
512 goto fail_sysfs; 512 goto fail_sysfs;
513 }
513 rc = register_filesystem(&hypfs_type); 514 rc = register_filesystem(&hypfs_type);
514 if (rc) 515 if (rc)
515 goto fail_filesystem; 516 goto fail_filesystem;
516 return 0; 517 return 0;
517 518
518fail_filesystem: 519fail_filesystem:
519 subsystem_unregister(&s390_subsys); 520 kobject_put(s390_kobj);
520fail_sysfs: 521fail_sysfs:
521 if (!MACHINE_IS_VM) 522 if (!MACHINE_IS_VM)
522 hypfs_diag_exit(); 523 hypfs_diag_exit();
@@ -530,7 +531,7 @@ static void __exit hypfs_exit(void)
530 if (!MACHINE_IS_VM) 531 if (!MACHINE_IS_VM)
531 hypfs_diag_exit(); 532 hypfs_diag_exit();
532 unregister_filesystem(&hypfs_type); 533 unregister_filesystem(&hypfs_type);
533 subsystem_unregister(&s390_subsys); 534 kobject_put(s390_kobj);
534} 535}
535 536
536module_init(hypfs_init) 537module_init(hypfs_init)
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index ce0856d32500..b97694fa62ec 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -162,22 +162,25 @@ EXPORT_SYMBOL_GPL(diag308);
162/* SYSFS */ 162/* SYSFS */
163 163
164#define DEFINE_IPL_ATTR_RO(_prefix, _name, _format, _value) \ 164#define DEFINE_IPL_ATTR_RO(_prefix, _name, _format, _value) \
165static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \ 165static ssize_t sys_##_prefix##_##_name##_show(struct kobject *kobj, \
166 struct kobj_attribute *attr, \
166 char *page) \ 167 char *page) \
167{ \ 168{ \
168 return sprintf(page, _format, _value); \ 169 return sprintf(page, _format, _value); \
169} \ 170} \
170static struct subsys_attribute sys_##_prefix##_##_name##_attr = \ 171static struct kobj_attribute sys_##_prefix##_##_name##_attr = \
171 __ATTR(_name, S_IRUGO, sys_##_prefix##_##_name##_show, NULL); 172 __ATTR(_name, S_IRUGO, sys_##_prefix##_##_name##_show, NULL);
172 173
173#define DEFINE_IPL_ATTR_RW(_prefix, _name, _fmt_out, _fmt_in, _value) \ 174#define DEFINE_IPL_ATTR_RW(_prefix, _name, _fmt_out, _fmt_in, _value) \
174static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \ 175static ssize_t sys_##_prefix##_##_name##_show(struct kobject *kobj, \
176 struct kobj_attribute *attr, \
175 char *page) \ 177 char *page) \
176{ \ 178{ \
177 return sprintf(page, _fmt_out, \ 179 return sprintf(page, _fmt_out, \
178 (unsigned long long) _value); \ 180 (unsigned long long) _value); \
179} \ 181} \
180static ssize_t sys_##_prefix##_##_name##_store(struct kset *kset, \ 182static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \
183 struct kobj_attribute *attr, \
181 const char *buf, size_t len) \ 184 const char *buf, size_t len) \
182{ \ 185{ \
183 unsigned long long value; \ 186 unsigned long long value; \
@@ -186,25 +189,27 @@ static ssize_t sys_##_prefix##_##_name##_store(struct kset *kset, \
186 _value = value; \ 189 _value = value; \
187 return len; \ 190 return len; \
188} \ 191} \
189static struct subsys_attribute sys_##_prefix##_##_name##_attr = \ 192static struct kobj_attribute sys_##_prefix##_##_name##_attr = \
190 __ATTR(_name,(S_IRUGO | S_IWUSR), \ 193 __ATTR(_name,(S_IRUGO | S_IWUSR), \
191 sys_##_prefix##_##_name##_show, \ 194 sys_##_prefix##_##_name##_show, \
192 sys_##_prefix##_##_name##_store); 195 sys_##_prefix##_##_name##_store);
193 196
194#define DEFINE_IPL_ATTR_STR_RW(_prefix, _name, _fmt_out, _fmt_in, _value)\ 197#define DEFINE_IPL_ATTR_STR_RW(_prefix, _name, _fmt_out, _fmt_in, _value)\
195static ssize_t sys_##_prefix##_##_name##_show(struct kset *kset, \ 198static ssize_t sys_##_prefix##_##_name##_show(struct kobject *kobj, \
199 struct kobj_attribute *attr, \
196 char *page) \ 200 char *page) \
197{ \ 201{ \
198 return sprintf(page, _fmt_out, _value); \ 202 return sprintf(page, _fmt_out, _value); \
199} \ 203} \
200static ssize_t sys_##_prefix##_##_name##_store(struct kset *kset, \ 204static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \
205 struct kobj_attribute *attr, \
201 const char *buf, size_t len) \ 206 const char *buf, size_t len) \
202{ \ 207{ \
203 if (sscanf(buf, _fmt_in, _value) != 1) \ 208 if (sscanf(buf, _fmt_in, _value) != 1) \
204 return -EINVAL; \ 209 return -EINVAL; \
205 return len; \ 210 return len; \
206} \ 211} \
207static struct subsys_attribute sys_##_prefix##_##_name##_attr = \ 212static struct kobj_attribute sys_##_prefix##_##_name##_attr = \
208 __ATTR(_name,(S_IRUGO | S_IWUSR), \ 213 __ATTR(_name,(S_IRUGO | S_IWUSR), \
209 sys_##_prefix##_##_name##_show, \ 214 sys_##_prefix##_##_name##_show, \
210 sys_##_prefix##_##_name##_store); 215 sys_##_prefix##_##_name##_store);
@@ -270,14 +275,16 @@ void __init setup_ipl_info(void)
270struct ipl_info ipl_info; 275struct ipl_info ipl_info;
271EXPORT_SYMBOL_GPL(ipl_info); 276EXPORT_SYMBOL_GPL(ipl_info);
272 277
273static ssize_t ipl_type_show(struct kset *kset, char *page) 278static ssize_t ipl_type_show(struct kobject *kobj, struct kobj_attribute *attr,
279 char *page)
274{ 280{
275 return sprintf(page, "%s\n", ipl_type_str(ipl_info.type)); 281 return sprintf(page, "%s\n", ipl_type_str(ipl_info.type));
276} 282}
277 283
278static struct subsys_attribute sys_ipl_type_attr = __ATTR_RO(ipl_type); 284static struct kobj_attribute sys_ipl_type_attr = __ATTR_RO(ipl_type);
279 285
280static ssize_t sys_ipl_device_show(struct kset *kset, char *page) 286static ssize_t sys_ipl_device_show(struct kobject *kobj,
287 struct kobj_attribute *attr, char *page)
281{ 288{
282 struct ipl_parameter_block *ipl = IPL_PARMBLOCK_START; 289 struct ipl_parameter_block *ipl = IPL_PARMBLOCK_START;
283 290
@@ -292,7 +299,7 @@ static ssize_t sys_ipl_device_show(struct kset *kset, char *page)
292 } 299 }
293} 300}
294 301
295static struct subsys_attribute sys_ipl_device_attr = 302static struct kobj_attribute sys_ipl_device_attr =
296 __ATTR(device, S_IRUGO, sys_ipl_device_show, NULL); 303 __ATTR(device, S_IRUGO, sys_ipl_device_show, NULL);
297 304
298static ssize_t ipl_parameter_read(struct kobject *kobj, struct bin_attribute *attr, 305static ssize_t ipl_parameter_read(struct kobject *kobj, struct bin_attribute *attr,
@@ -367,7 +374,8 @@ static struct attribute_group ipl_fcp_attr_group = {
367 374
368/* CCW ipl device attributes */ 375/* CCW ipl device attributes */
369 376
370static ssize_t ipl_ccw_loadparm_show(struct kset *kset, char *page) 377static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj,
378 struct kobj_attribute *attr, char *page)
371{ 379{
372 char loadparm[LOADPARM_LEN + 1] = {}; 380 char loadparm[LOADPARM_LEN + 1] = {};
373 381
@@ -379,7 +387,7 @@ static ssize_t ipl_ccw_loadparm_show(struct kset *kset, char *page)
379 return sprintf(page, "%s\n", loadparm); 387 return sprintf(page, "%s\n", loadparm);
380} 388}
381 389
382static struct subsys_attribute sys_ipl_ccw_loadparm_attr = 390static struct kobj_attribute sys_ipl_ccw_loadparm_attr =
383 __ATTR(loadparm, 0444, ipl_ccw_loadparm_show, NULL); 391 __ATTR(loadparm, 0444, ipl_ccw_loadparm_show, NULL);
384 392
385static struct attribute *ipl_ccw_attrs[] = { 393static struct attribute *ipl_ccw_attrs[] = {
@@ -418,7 +426,7 @@ static struct attribute_group ipl_unknown_attr_group = {
418 .attrs = ipl_unknown_attrs, 426 .attrs = ipl_unknown_attrs,
419}; 427};
420 428
421static decl_subsys(ipl, NULL, NULL); 429static struct kset *ipl_kset;
422 430
423/* 431/*
424 * reipl section 432 * reipl section
@@ -465,7 +473,8 @@ static void reipl_get_ascii_loadparm(char *loadparm)
465 strstrip(loadparm); 473 strstrip(loadparm);
466} 474}
467 475
468static ssize_t reipl_ccw_loadparm_show(struct kset *kset, char *page) 476static ssize_t reipl_ccw_loadparm_show(struct kobject *kobj,
477 struct kobj_attribute *attr, char *page)
469{ 478{
470 char buf[LOADPARM_LEN + 1]; 479 char buf[LOADPARM_LEN + 1];
471 480
@@ -473,7 +482,8 @@ static ssize_t reipl_ccw_loadparm_show(struct kset *kset, char *page)
473 return sprintf(page, "%s\n", buf); 482 return sprintf(page, "%s\n", buf);
474} 483}
475 484
476static ssize_t reipl_ccw_loadparm_store(struct kset *kset, 485static ssize_t reipl_ccw_loadparm_store(struct kobject *kobj,
486 struct kobj_attribute *attr,
477 const char *buf, size_t len) 487 const char *buf, size_t len)
478{ 488{
479 int i, lp_len; 489 int i, lp_len;
@@ -500,7 +510,7 @@ static ssize_t reipl_ccw_loadparm_store(struct kset *kset,
500 return len; 510 return len;
501} 511}
502 512
503static struct subsys_attribute sys_reipl_ccw_loadparm_attr = 513static struct kobj_attribute sys_reipl_ccw_loadparm_attr =
504 __ATTR(loadparm, 0644, reipl_ccw_loadparm_show, 514 __ATTR(loadparm, 0644, reipl_ccw_loadparm_show,
505 reipl_ccw_loadparm_store); 515 reipl_ccw_loadparm_store);
506 516
@@ -568,13 +578,15 @@ static int reipl_set_type(enum ipl_type type)
568 return 0; 578 return 0;
569} 579}
570 580
571static ssize_t reipl_type_show(struct kset *kset, char *page) 581static ssize_t reipl_type_show(struct kobject *kobj,
582 struct kobj_attribute *attr, char *page)
572{ 583{
573 return sprintf(page, "%s\n", ipl_type_str(reipl_type)); 584 return sprintf(page, "%s\n", ipl_type_str(reipl_type));
574} 585}
575 586
576static ssize_t reipl_type_store(struct kset *kset, const char *buf, 587static ssize_t reipl_type_store(struct kobject *kobj,
577 size_t len) 588 struct kobj_attribute *attr,
589 const char *buf, size_t len)
578{ 590{
579 int rc = -EINVAL; 591 int rc = -EINVAL;
580 592
@@ -587,10 +599,10 @@ static ssize_t reipl_type_store(struct kset *kset, const char *buf,
587 return (rc != 0) ? rc : len; 599 return (rc != 0) ? rc : len;
588} 600}
589 601
590static struct subsys_attribute reipl_type_attr = 602static struct kobj_attribute reipl_type_attr =
591 __ATTR(reipl_type, 0644, reipl_type_show, reipl_type_store); 603 __ATTR(reipl_type, 0644, reipl_type_show, reipl_type_store);
592 604
593static decl_subsys(reipl, NULL, NULL); 605static struct kset *reipl_kset;
594 606
595/* 607/*
596 * dump section 608 * dump section
@@ -663,13 +675,15 @@ static int dump_set_type(enum dump_type type)
663 return 0; 675 return 0;
664} 676}
665 677
666static ssize_t dump_type_show(struct kset *kset, char *page) 678static ssize_t dump_type_show(struct kobject *kobj,
679 struct kobj_attribute *attr, char *page)
667{ 680{
668 return sprintf(page, "%s\n", dump_type_str(dump_type)); 681 return sprintf(page, "%s\n", dump_type_str(dump_type));
669} 682}
670 683
671static ssize_t dump_type_store(struct kset *kset, const char *buf, 684static ssize_t dump_type_store(struct kobject *kobj,
672 size_t len) 685 struct kobj_attribute *attr,
686 const char *buf, size_t len)
673{ 687{
674 int rc = -EINVAL; 688 int rc = -EINVAL;
675 689
@@ -682,26 +696,28 @@ static ssize_t dump_type_store(struct kset *kset, const char *buf,
682 return (rc != 0) ? rc : len; 696 return (rc != 0) ? rc : len;
683} 697}
684 698
685static struct subsys_attribute dump_type_attr = 699static struct kobj_attribute dump_type_attr =
686 __ATTR(dump_type, 0644, dump_type_show, dump_type_store); 700 __ATTR(dump_type, 0644, dump_type_show, dump_type_store);
687 701
688static decl_subsys(dump, NULL, NULL); 702static struct kset *dump_kset;
689 703
690/* 704/*
691 * Shutdown actions section 705 * Shutdown actions section
692 */ 706 */
693 707
694static decl_subsys(shutdown_actions, NULL, NULL); 708static struct kset *shutdown_actions_kset;
695 709
696/* on panic */ 710/* on panic */
697 711
698static ssize_t on_panic_show(struct kset *kset, char *page) 712static ssize_t on_panic_show(struct kobject *kobj,
713 struct kobj_attribute *attr, char *page)
699{ 714{
700 return sprintf(page, "%s\n", shutdown_action_str(on_panic_action)); 715 return sprintf(page, "%s\n", shutdown_action_str(on_panic_action));
701} 716}
702 717
703static ssize_t on_panic_store(struct kset *kset, const char *buf, 718static ssize_t on_panic_store(struct kobject *kobj,
704 size_t len) 719 struct kobj_attribute *attr,
720 const char *buf, size_t len)
705{ 721{
706 if (strncmp(buf, SHUTDOWN_REIPL_STR, strlen(SHUTDOWN_REIPL_STR)) == 0) 722 if (strncmp(buf, SHUTDOWN_REIPL_STR, strlen(SHUTDOWN_REIPL_STR)) == 0)
707 on_panic_action = SHUTDOWN_REIPL; 723 on_panic_action = SHUTDOWN_REIPL;
@@ -717,7 +733,7 @@ static ssize_t on_panic_store(struct kset *kset, const char *buf,
717 return len; 733 return len;
718} 734}
719 735
720static struct subsys_attribute on_panic_attr = 736static struct kobj_attribute on_panic_attr =
721 __ATTR(on_panic, 0644, on_panic_show, on_panic_store); 737 __ATTR(on_panic, 0644, on_panic_show, on_panic_store);
722 738
723void do_reipl(void) 739void do_reipl(void)
@@ -814,23 +830,23 @@ static int __init ipl_register_fcp_files(void)
814{ 830{
815 int rc; 831 int rc;
816 832
817 rc = sysfs_create_group(&ipl_subsys.kobj, 833 rc = sysfs_create_group(&ipl_kset->kobj,
818 &ipl_fcp_attr_group); 834 &ipl_fcp_attr_group);
819 if (rc) 835 if (rc)
820 goto out; 836 goto out;
821 rc = sysfs_create_bin_file(&ipl_subsys.kobj, 837 rc = sysfs_create_bin_file(&ipl_kset->kobj,
822 &ipl_parameter_attr); 838 &ipl_parameter_attr);
823 if (rc) 839 if (rc)
824 goto out_ipl_parm; 840 goto out_ipl_parm;
825 rc = sysfs_create_bin_file(&ipl_subsys.kobj, 841 rc = sysfs_create_bin_file(&ipl_kset->kobj,
826 &ipl_scp_data_attr); 842 &ipl_scp_data_attr);
827 if (!rc) 843 if (!rc)
828 goto out; 844 goto out;
829 845
830 sysfs_remove_bin_file(&ipl_subsys.kobj, &ipl_parameter_attr); 846 sysfs_remove_bin_file(&ipl_kset->kobj, &ipl_parameter_attr);
831 847
832out_ipl_parm: 848out_ipl_parm:
833 sysfs_remove_group(&ipl_subsys.kobj, &ipl_fcp_attr_group); 849 sysfs_remove_group(&ipl_kset->kobj, &ipl_fcp_attr_group);
834out: 850out:
835 return rc; 851 return rc;
836} 852}
@@ -839,12 +855,12 @@ static int __init ipl_init(void)
839{ 855{
840 int rc; 856 int rc;
841 857
842 rc = firmware_register(&ipl_subsys); 858 ipl_kset = kset_create_and_add("ipl", NULL, firmware_kobj);
843 if (rc) 859 if (!ipl_kset)
844 return rc; 860 return -ENOMEM;
845 switch (ipl_info.type) { 861 switch (ipl_info.type) {
846 case IPL_TYPE_CCW: 862 case IPL_TYPE_CCW:
847 rc = sysfs_create_group(&ipl_subsys.kobj, 863 rc = sysfs_create_group(&ipl_kset->kobj,
848 &ipl_ccw_attr_group); 864 &ipl_ccw_attr_group);
849 break; 865 break;
850 case IPL_TYPE_FCP: 866 case IPL_TYPE_FCP:
@@ -852,16 +868,16 @@ static int __init ipl_init(void)
852 rc = ipl_register_fcp_files(); 868 rc = ipl_register_fcp_files();
853 break; 869 break;
854 case IPL_TYPE_NSS: 870 case IPL_TYPE_NSS:
855 rc = sysfs_create_group(&ipl_subsys.kobj, 871 rc = sysfs_create_group(&ipl_kset->kobj,
856 &ipl_nss_attr_group); 872 &ipl_nss_attr_group);
857 break; 873 break;
858 default: 874 default:
859 rc = sysfs_create_group(&ipl_subsys.kobj, 875 rc = sysfs_create_group(&ipl_kset->kobj,
860 &ipl_unknown_attr_group); 876 &ipl_unknown_attr_group);
861 break; 877 break;
862 } 878 }
863 if (rc) 879 if (rc)
864 firmware_unregister(&ipl_subsys); 880 kset_unregister(ipl_kset);
865 return rc; 881 return rc;
866} 882}
867 883
@@ -883,7 +899,7 @@ static int __init reipl_nss_init(void)
883 899
884 if (!MACHINE_IS_VM) 900 if (!MACHINE_IS_VM)
885 return 0; 901 return 0;
886 rc = sysfs_create_group(&reipl_subsys.kobj, &reipl_nss_attr_group); 902 rc = sysfs_create_group(&reipl_kset->kobj, &reipl_nss_attr_group);
887 if (rc) 903 if (rc)
888 return rc; 904 return rc;
889 strncpy(reipl_nss_name, kernel_nss_name, NSS_NAME_SIZE + 1); 905 strncpy(reipl_nss_name, kernel_nss_name, NSS_NAME_SIZE + 1);
@@ -898,7 +914,7 @@ static int __init reipl_ccw_init(void)
898 reipl_block_ccw = (void *) get_zeroed_page(GFP_KERNEL); 914 reipl_block_ccw = (void *) get_zeroed_page(GFP_KERNEL);
899 if (!reipl_block_ccw) 915 if (!reipl_block_ccw)
900 return -ENOMEM; 916 return -ENOMEM;
901 rc = sysfs_create_group(&reipl_subsys.kobj, &reipl_ccw_attr_group); 917 rc = sysfs_create_group(&reipl_kset->kobj, &reipl_ccw_attr_group);
902 if (rc) { 918 if (rc) {
903 free_page((unsigned long)reipl_block_ccw); 919 free_page((unsigned long)reipl_block_ccw);
904 return rc; 920 return rc;
@@ -936,7 +952,7 @@ static int __init reipl_fcp_init(void)
936 reipl_block_fcp = (void *) get_zeroed_page(GFP_KERNEL); 952 reipl_block_fcp = (void *) get_zeroed_page(GFP_KERNEL);
937 if (!reipl_block_fcp) 953 if (!reipl_block_fcp)
938 return -ENOMEM; 954 return -ENOMEM;
939 rc = sysfs_create_group(&reipl_subsys.kobj, &reipl_fcp_attr_group); 955 rc = sysfs_create_group(&reipl_kset->kobj, &reipl_fcp_attr_group);
940 if (rc) { 956 if (rc) {
941 free_page((unsigned long)reipl_block_fcp); 957 free_page((unsigned long)reipl_block_fcp);
942 return rc; 958 return rc;
@@ -958,12 +974,12 @@ static int __init reipl_init(void)
958{ 974{
959 int rc; 975 int rc;
960 976
961 rc = firmware_register(&reipl_subsys); 977 reipl_kset = kset_create_and_add("reipl", NULL, firmware_kobj);
962 if (rc) 978 if (!reipl_kset)
963 return rc; 979 return -ENOMEM;
964 rc = subsys_create_file(&reipl_subsys, &reipl_type_attr); 980 rc = sysfs_create_file(&reipl_kset->kobj, &reipl_type_attr.attr);
965 if (rc) { 981 if (rc) {
966 firmware_unregister(&reipl_subsys); 982 kset_unregister(reipl_kset);
967 return rc; 983 return rc;
968 } 984 }
969 rc = reipl_ccw_init(); 985 rc = reipl_ccw_init();
@@ -988,7 +1004,7 @@ static int __init dump_ccw_init(void)
988 dump_block_ccw = (void *) get_zeroed_page(GFP_KERNEL); 1004 dump_block_ccw = (void *) get_zeroed_page(GFP_KERNEL);
989 if (!dump_block_ccw) 1005 if (!dump_block_ccw)
990 return -ENOMEM; 1006 return -ENOMEM;
991 rc = sysfs_create_group(&dump_subsys.kobj, &dump_ccw_attr_group); 1007 rc = sysfs_create_group(&dump_kset->kobj, &dump_ccw_attr_group);
992 if (rc) { 1008 if (rc) {
993 free_page((unsigned long)dump_block_ccw); 1009 free_page((unsigned long)dump_block_ccw);
994 return rc; 1010 return rc;
@@ -1012,7 +1028,7 @@ static int __init dump_fcp_init(void)
1012 dump_block_fcp = (void *) get_zeroed_page(GFP_KERNEL); 1028 dump_block_fcp = (void *) get_zeroed_page(GFP_KERNEL);
1013 if (!dump_block_fcp) 1029 if (!dump_block_fcp)
1014 return -ENOMEM; 1030 return -ENOMEM;
1015 rc = sysfs_create_group(&dump_subsys.kobj, &dump_fcp_attr_group); 1031 rc = sysfs_create_group(&dump_kset->kobj, &dump_fcp_attr_group);
1016 if (rc) { 1032 if (rc) {
1017 free_page((unsigned long)dump_block_fcp); 1033 free_page((unsigned long)dump_block_fcp);
1018 return rc; 1034 return rc;
@@ -1047,12 +1063,12 @@ static int __init dump_init(void)
1047{ 1063{
1048 int rc; 1064 int rc;
1049 1065
1050 rc = firmware_register(&dump_subsys); 1066 dump_kset = kset_create_and_add("dump", NULL, firmware_kobj);
1051 if (rc) 1067 if (!dump_kset)
1052 return rc; 1068 return -ENOMEM;
1053 rc = subsys_create_file(&dump_subsys, &dump_type_attr); 1069 rc = sysfs_create_file(&dump_kset->kobj, &dump_type_attr);
1054 if (rc) { 1070 if (rc) {
1055 firmware_unregister(&dump_subsys); 1071 kset_unregister(dump_kset);
1056 return rc; 1072 return rc;
1057 } 1073 }
1058 rc = dump_ccw_init(); 1074 rc = dump_ccw_init();
@@ -1069,12 +1085,13 @@ static int __init shutdown_actions_init(void)
1069{ 1085{
1070 int rc; 1086 int rc;
1071 1087
1072 rc = firmware_register(&shutdown_actions_subsys); 1088 shutdown_actions_kset = kset_create_and_add("shutdown_actions", NULL,
1073 if (rc) 1089 firmware_kobj);
1074 return rc; 1090 if (!shutdown_actions_kset)
1075 rc = subsys_create_file(&shutdown_actions_subsys, &on_panic_attr); 1091 return -ENOMEM;
1092 rc = sysfs_create_file(&shutdown_actions_kset->kobj, &on_panic_attr);
1076 if (rc) { 1093 if (rc) {
1077 firmware_unregister(&shutdown_actions_subsys); 1094 kset_unregister(shutdown_actions_kset);
1078 return rc; 1095 return rc;
1079 } 1096 }
1080 atomic_notifier_chain_register(&panic_notifier_list, 1097 atomic_notifier_chain_register(&panic_notifier_list,
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 22b800ce2126..3bbac1293be4 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -1145,7 +1145,7 @@ static void etr_work_fn(struct work_struct *work)
1145 * Sysfs interface functions 1145 * Sysfs interface functions
1146 */ 1146 */
1147static struct sysdev_class etr_sysclass = { 1147static struct sysdev_class etr_sysclass = {
1148 set_kset_name("etr") 1148 .name = "etr",
1149}; 1149};
1150 1150
1151static struct sys_device etr_port0_dev = { 1151static struct sys_device etr_port0_dev = {