diff options
author | Markus Lidel <Markus.Lidel@shadowconnect.com> | 2006-01-06 03:19:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:54 -0500 |
commit | 24791bd48f643194d806654b587251b0f92233e8 (patch) | |
tree | c95c4db1a565146e3c1d565ba1b796e78d88d556 /drivers/message/i2o/iop.c | |
parent | 793fd15d9fafe5b1c71e50d3c041f1463895dbde (diff) |
[PATCH] I2O: Remove wrong I2O device class
Removed wrong I2O device class, which was only needed to add sysfs attributes.
Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message/i2o/iop.c')
-rw-r--r-- | drivers/message/i2o/iop.c | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c index f86abb42bf89..7411a0504bf2 100644 --- a/drivers/message/i2o/iop.c +++ b/drivers/message/i2o/iop.c | |||
@@ -806,7 +806,6 @@ void i2o_iop_remove(struct i2o_controller *c) | |||
806 | list_for_each_entry_safe(dev, tmp, &c->devices, list) | 806 | list_for_each_entry_safe(dev, tmp, &c->devices, list) |
807 | i2o_device_remove(dev); | 807 | i2o_device_remove(dev); |
808 | 808 | ||
809 | class_device_unregister(c->classdev); | ||
810 | device_del(&c->device); | 809 | device_del(&c->device); |
811 | 810 | ||
812 | /* Ask the IOP to switch to RESET state */ | 811 | /* Ask the IOP to switch to RESET state */ |
@@ -1050,9 +1049,6 @@ static void i2o_iop_release(struct device *dev) | |||
1050 | i2o_iop_free(c); | 1049 | i2o_iop_free(c); |
1051 | }; | 1050 | }; |
1052 | 1051 | ||
1053 | /* I2O controller class */ | ||
1054 | static struct class *i2o_controller_class; | ||
1055 | |||
1056 | /** | 1052 | /** |
1057 | * i2o_iop_alloc - Allocate and initialize a i2o_controller struct | 1053 | * i2o_iop_alloc - Allocate and initialize a i2o_controller struct |
1058 | * | 1054 | * |
@@ -1124,36 +1120,29 @@ int i2o_iop_add(struct i2o_controller *c) | |||
1124 | goto iop_reset; | 1120 | goto iop_reset; |
1125 | } | 1121 | } |
1126 | 1122 | ||
1127 | c->classdev = class_device_create(i2o_controller_class, NULL, MKDEV(0,0), | ||
1128 | &c->device, "iop%d", c->unit); | ||
1129 | if (IS_ERR(c->classdev)) { | ||
1130 | osm_err("%s: could not add controller class\n", c->name); | ||
1131 | goto device_del; | ||
1132 | } | ||
1133 | |||
1134 | osm_info("%s: Activating I2O controller...\n", c->name); | 1123 | osm_info("%s: Activating I2O controller...\n", c->name); |
1135 | osm_info("%s: This may take a few minutes if there are many devices\n", | 1124 | osm_info("%s: This may take a few minutes if there are many devices\n", |
1136 | c->name); | 1125 | c->name); |
1137 | 1126 | ||
1138 | if ((rc = i2o_iop_activate(c))) { | 1127 | if ((rc = i2o_iop_activate(c))) { |
1139 | osm_err("%s: could not activate controller\n", c->name); | 1128 | osm_err("%s: could not activate controller\n", c->name); |
1140 | goto class_del; | 1129 | goto device_del; |
1141 | } | 1130 | } |
1142 | 1131 | ||
1143 | osm_debug("%s: building sys table...\n", c->name); | 1132 | osm_debug("%s: building sys table...\n", c->name); |
1144 | 1133 | ||
1145 | if ((rc = i2o_systab_build())) | 1134 | if ((rc = i2o_systab_build())) |
1146 | goto class_del; | 1135 | goto device_del; |
1147 | 1136 | ||
1148 | osm_debug("%s: online controller...\n", c->name); | 1137 | osm_debug("%s: online controller...\n", c->name); |
1149 | 1138 | ||
1150 | if ((rc = i2o_iop_online(c))) | 1139 | if ((rc = i2o_iop_online(c))) |
1151 | goto class_del; | 1140 | goto device_del; |
1152 | 1141 | ||
1153 | osm_debug("%s: getting LCT...\n", c->name); | 1142 | osm_debug("%s: getting LCT...\n", c->name); |
1154 | 1143 | ||
1155 | if ((rc = i2o_exec_lct_get(c))) | 1144 | if ((rc = i2o_exec_lct_get(c))) |
1156 | goto class_del; | 1145 | goto device_del; |
1157 | 1146 | ||
1158 | list_add(&c->list, &i2o_controllers); | 1147 | list_add(&c->list, &i2o_controllers); |
1159 | 1148 | ||
@@ -1163,9 +1152,6 @@ int i2o_iop_add(struct i2o_controller *c) | |||
1163 | 1152 | ||
1164 | return 0; | 1153 | return 0; |
1165 | 1154 | ||
1166 | class_del: | ||
1167 | class_device_unregister(c->classdev); | ||
1168 | |||
1169 | device_del: | 1155 | device_del: |
1170 | device_del(&c->device); | 1156 | device_del(&c->device); |
1171 | 1157 | ||
@@ -1225,14 +1211,8 @@ static int __init i2o_iop_init(void) | |||
1225 | 1211 | ||
1226 | printk(KERN_INFO OSM_DESCRIPTION " v" OSM_VERSION "\n"); | 1212 | printk(KERN_INFO OSM_DESCRIPTION " v" OSM_VERSION "\n"); |
1227 | 1213 | ||
1228 | i2o_controller_class = class_create(THIS_MODULE, "i2o_controller"); | ||
1229 | if (IS_ERR(i2o_controller_class)) { | ||
1230 | osm_err("can't register class i2o_controller\n"); | ||
1231 | goto exit; | ||
1232 | } | ||
1233 | |||
1234 | if ((rc = i2o_driver_init())) | 1214 | if ((rc = i2o_driver_init())) |
1235 | goto class_exit; | 1215 | goto exit; |
1236 | 1216 | ||
1237 | if ((rc = i2o_exec_init())) | 1217 | if ((rc = i2o_exec_init())) |
1238 | goto driver_exit; | 1218 | goto driver_exit; |
@@ -1248,9 +1228,6 @@ static int __init i2o_iop_init(void) | |||
1248 | driver_exit: | 1228 | driver_exit: |
1249 | i2o_driver_exit(); | 1229 | i2o_driver_exit(); |
1250 | 1230 | ||
1251 | class_exit: | ||
1252 | class_destroy(i2o_controller_class); | ||
1253 | |||
1254 | exit: | 1231 | exit: |
1255 | return rc; | 1232 | return rc; |
1256 | } | 1233 | } |
@@ -1265,7 +1242,6 @@ static void __exit i2o_iop_exit(void) | |||
1265 | i2o_pci_exit(); | 1242 | i2o_pci_exit(); |
1266 | i2o_exec_exit(); | 1243 | i2o_exec_exit(); |
1267 | i2o_driver_exit(); | 1244 | i2o_driver_exit(); |
1268 | class_destroy(i2o_controller_class); | ||
1269 | }; | 1245 | }; |
1270 | 1246 | ||
1271 | module_init(i2o_iop_init); | 1247 | module_init(i2o_iop_init); |