diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp_config.c | 4 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 16 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 14 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ext.h | 3 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_sysfs_driver.c | 27 |
5 files changed, 17 insertions, 47 deletions
diff --git a/drivers/s390/char/sclp_config.c b/drivers/s390/char/sclp_config.c index 5322e5e54a98..9dc77f14fa52 100644 --- a/drivers/s390/char/sclp_config.c +++ b/drivers/s390/char/sclp_config.c | |||
@@ -29,12 +29,12 @@ static void sclp_cpu_capability_notify(struct work_struct *work) | |||
29 | struct sys_device *sysdev; | 29 | struct sys_device *sysdev; |
30 | 30 | ||
31 | printk(KERN_WARNING TAG "cpu capability changed.\n"); | 31 | printk(KERN_WARNING TAG "cpu capability changed.\n"); |
32 | lock_cpu_hotplug(); | 32 | get_online_cpus(); |
33 | for_each_online_cpu(cpu) { | 33 | for_each_online_cpu(cpu) { |
34 | sysdev = get_cpu_sysdev(cpu); | 34 | sysdev = get_cpu_sysdev(cpu); |
35 | kobject_uevent(&sysdev->kobj, KOBJ_CHANGE); | 35 | kobject_uevent(&sysdev->kobj, KOBJ_CHANGE); |
36 | } | 36 | } |
37 | unlock_cpu_hotplug(); | 37 | put_online_cpus(); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void sclp_conf_receiver_fn(struct evbuf_header *evbuf) | 40 | static void sclp_conf_receiver_fn(struct evbuf_header *evbuf) |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index c7ea9381db9f..d6e93f15440e 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -2089,6 +2089,11 @@ static struct attribute_group netiucv_drv_attr_group = { | |||
2089 | .attrs = netiucv_drv_attrs, | 2089 | .attrs = netiucv_drv_attrs, |
2090 | }; | 2090 | }; |
2091 | 2091 | ||
2092 | static struct attribute_group *netiucv_drv_attr_groups[] = { | ||
2093 | &netiucv_drv_attr_group, | ||
2094 | NULL, | ||
2095 | }; | ||
2096 | |||
2092 | static void netiucv_banner(void) | 2097 | static void netiucv_banner(void) |
2093 | { | 2098 | { |
2094 | PRINT_INFO("NETIUCV driver initialized\n"); | 2099 | PRINT_INFO("NETIUCV driver initialized\n"); |
@@ -2113,7 +2118,6 @@ static void __exit netiucv_exit(void) | |||
2113 | netiucv_unregister_device(dev); | 2118 | netiucv_unregister_device(dev); |
2114 | } | 2119 | } |
2115 | 2120 | ||
2116 | sysfs_remove_group(&netiucv_driver.kobj, &netiucv_drv_attr_group); | ||
2117 | driver_unregister(&netiucv_driver); | 2121 | driver_unregister(&netiucv_driver); |
2118 | iucv_unregister(&netiucv_handler, 1); | 2122 | iucv_unregister(&netiucv_handler, 1); |
2119 | iucv_unregister_dbf_views(); | 2123 | iucv_unregister_dbf_views(); |
@@ -2133,6 +2137,7 @@ static int __init netiucv_init(void) | |||
2133 | if (rc) | 2137 | if (rc) |
2134 | goto out_dbf; | 2138 | goto out_dbf; |
2135 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 2139 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); |
2140 | netiucv_driver.groups = netiucv_drv_attr_groups; | ||
2136 | rc = driver_register(&netiucv_driver); | 2141 | rc = driver_register(&netiucv_driver); |
2137 | if (rc) { | 2142 | if (rc) { |
2138 | PRINT_ERR("NETIUCV: failed to register driver.\n"); | 2143 | PRINT_ERR("NETIUCV: failed to register driver.\n"); |
@@ -2140,18 +2145,9 @@ static int __init netiucv_init(void) | |||
2140 | goto out_iucv; | 2145 | goto out_iucv; |
2141 | } | 2146 | } |
2142 | 2147 | ||
2143 | rc = sysfs_create_group(&netiucv_driver.kobj, &netiucv_drv_attr_group); | ||
2144 | if (rc) { | ||
2145 | PRINT_ERR("NETIUCV: failed to add driver attributes.\n"); | ||
2146 | IUCV_DBF_TEXT_(setup, 2, | ||
2147 | "ret %d - netiucv_drv_attr_group\n", rc); | ||
2148 | goto out_driver; | ||
2149 | } | ||
2150 | netiucv_banner(); | 2148 | netiucv_banner(); |
2151 | return rc; | 2149 | return rc; |
2152 | 2150 | ||
2153 | out_driver: | ||
2154 | driver_unregister(&netiucv_driver); | ||
2155 | out_iucv: | 2151 | out_iucv: |
2156 | iucv_unregister(&netiucv_handler, 1); | 2152 | iucv_unregister(&netiucv_handler, 1); |
2157 | out_dbf: | 2153 | out_dbf: |
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index a6a29a24d28a..edc5015e920d 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -52,6 +52,9 @@ static struct ccw_driver zfcp_ccw_driver = { | |||
52 | .set_offline = zfcp_ccw_set_offline, | 52 | .set_offline = zfcp_ccw_set_offline, |
53 | .notify = zfcp_ccw_notify, | 53 | .notify = zfcp_ccw_notify, |
54 | .shutdown = zfcp_ccw_shutdown, | 54 | .shutdown = zfcp_ccw_shutdown, |
55 | .driver = { | ||
56 | .groups = zfcp_driver_attr_groups, | ||
57 | }, | ||
55 | }; | 58 | }; |
56 | 59 | ||
57 | MODULE_DEVICE_TABLE(ccw, zfcp_ccw_device_id); | 60 | MODULE_DEVICE_TABLE(ccw, zfcp_ccw_device_id); |
@@ -254,16 +257,7 @@ zfcp_ccw_notify(struct ccw_device *ccw_device, int event) | |||
254 | int __init | 257 | int __init |
255 | zfcp_ccw_register(void) | 258 | zfcp_ccw_register(void) |
256 | { | 259 | { |
257 | int retval; | 260 | return ccw_driver_register(&zfcp_ccw_driver); |
258 | |||
259 | retval = ccw_driver_register(&zfcp_ccw_driver); | ||
260 | if (retval) | ||
261 | goto out; | ||
262 | retval = zfcp_sysfs_driver_create_files(&zfcp_ccw_driver.driver); | ||
263 | if (retval) | ||
264 | ccw_driver_unregister(&zfcp_ccw_driver); | ||
265 | out: | ||
266 | return retval; | ||
267 | } | 261 | } |
268 | 262 | ||
269 | /** | 263 | /** |
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index 8534cf09546c..06b1079b7f3d 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h | |||
@@ -27,8 +27,7 @@ | |||
27 | extern struct zfcp_data zfcp_data; | 27 | extern struct zfcp_data zfcp_data; |
28 | 28 | ||
29 | /******************************** SYSFS *************************************/ | 29 | /******************************** SYSFS *************************************/ |
30 | extern int zfcp_sysfs_driver_create_files(struct device_driver *); | 30 | extern struct attribute_group *zfcp_driver_attr_groups[]; |
31 | extern void zfcp_sysfs_driver_remove_files(struct device_driver *); | ||
32 | extern int zfcp_sysfs_adapter_create_files(struct device *); | 31 | extern int zfcp_sysfs_adapter_create_files(struct device *); |
33 | extern void zfcp_sysfs_adapter_remove_files(struct device *); | 32 | extern void zfcp_sysfs_adapter_remove_files(struct device *); |
34 | extern int zfcp_sysfs_port_create_files(struct device *, u32); | 33 | extern int zfcp_sysfs_port_create_files(struct device *, u32); |
diff --git a/drivers/s390/scsi/zfcp_sysfs_driver.c b/drivers/s390/scsi/zfcp_sysfs_driver.c index 005e62f8593b..651edd58906a 100644 --- a/drivers/s390/scsi/zfcp_sysfs_driver.c +++ b/drivers/s390/scsi/zfcp_sysfs_driver.c | |||
@@ -98,28 +98,9 @@ static struct attribute_group zfcp_driver_attr_group = { | |||
98 | .attrs = zfcp_driver_attrs, | 98 | .attrs = zfcp_driver_attrs, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | /** | 101 | struct attribute_group *zfcp_driver_attr_groups[] = { |
102 | * zfcp_sysfs_create_driver_files - create sysfs driver files | 102 | &zfcp_driver_attr_group, |
103 | * @dev: pointer to belonging device | 103 | NULL, |
104 | * | 104 | }; |
105 | * Create all sysfs attributes of the zfcp device driver | ||
106 | */ | ||
107 | int | ||
108 | zfcp_sysfs_driver_create_files(struct device_driver *drv) | ||
109 | { | ||
110 | return sysfs_create_group(&drv->kobj, &zfcp_driver_attr_group); | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * zfcp_sysfs_remove_driver_files - remove sysfs driver files | ||
115 | * @dev: pointer to belonging device | ||
116 | * | ||
117 | * Remove all sysfs attributes of the zfcp device driver | ||
118 | */ | ||
119 | void | ||
120 | zfcp_sysfs_driver_remove_files(struct device_driver *drv) | ||
121 | { | ||
122 | sysfs_remove_group(&drv->kobj, &zfcp_driver_attr_group); | ||
123 | } | ||
124 | 105 | ||
125 | #undef ZFCP_LOG_AREA | 106 | #undef ZFCP_LOG_AREA |