Changes in uspace/drv/test/test1/test1.c [80a96d2:deac215e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/test/test1/test1.c
r80a96d2 rdeac215e 42 42 static int test1_add_device(ddf_dev_t *dev); 43 43 static int test1_dev_remove(ddf_dev_t *dev); 44 static int test1_dev_gone(ddf_dev_t *dev);45 44 static int test1_fun_online(ddf_fun_t *fun); 46 45 static int test1_fun_offline(ddf_fun_t *fun); … … 49 48 .add_device = &test1_add_device, 50 49 .dev_remove = &test1_dev_remove, 51 .dev_gone = &test1_dev_gone,52 50 .fun_online = &test1_fun_online, 53 51 .fun_offline = &test1_fun_offline … … 215 213 } 216 214 217 static int fun_unbind(ddf_fun_t *fun, const char *name)218 {219 int rc;220 221 ddf_msg(LVL_DEBUG, "fun_unbind(%p, '%s')", fun, name);222 rc = ddf_fun_unbind(fun);223 if (rc != EOK) {224 ddf_msg(LVL_ERROR, "Failed unbinding function '%s'.", name);225 return rc;226 }227 228 ddf_fun_destroy(fun);229 return EOK;230 }231 232 215 static int test1_dev_remove(ddf_dev_t *dev) 233 216 { … … 258 241 } 259 242 260 static int test1_dev_gone(ddf_dev_t *dev)261 {262 test1_t *test1 = (test1_t *)dev->driver_data;263 int rc;264 265 ddf_msg(LVL_DEBUG, "test1_dev_remove(%p)", dev);266 267 if (test1->fun_a != NULL) {268 rc = fun_unbind(test1->fun_a, "a");269 if (rc != EOK)270 return rc;271 }272 273 if (test1->clone != NULL) {274 rc = fun_unbind(test1->clone, "clone");275 if (rc != EOK)276 return rc;277 }278 279 if (test1->child != NULL) {280 rc = fun_unbind(test1->child, "child");281 if (rc != EOK)282 return rc;283 }284 285 return EOK;286 }287 288 243 static int test1_fun_online(ddf_fun_t *fun) 289 244 {
Note:
See TracChangeset
for help on using the changeset viewer.