diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-12-05 06:50:28 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:34 -0500 |
commit | 5b88feb134e0a7413cb9cb6ba677943615ca56cc (patch) | |
tree | 0a4c955b2c50958093491a456c5d80996a9cf2ef /drivers | |
parent | 57c745340a60c51d2b9af3d4dcf7e0ede284855b (diff) |
netiucv: Use device_driver default attribute groups.
CC: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/net/netiucv.c | 16 |
1 files changed, 6 insertions, 10 deletions
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: |