Changeset dd0c8a0 in mainline for uspace/drv/char/ps2mouse/main.c
- Timestamp:
- 2013-09-29T06:56:33Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a9bd960d
- Parents:
- 3deb0155 (diff), 13be2583 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/ps2mouse/main.c
r3deb0155 rdd0c8a0 80 80 static int mouse_add(ddf_dev_t *device) 81 81 { 82 int rc; 83 82 84 if (!device) 83 85 return EINVAL; 84 86 85 #define CHECK_RET_RETURN(ret, message...) \ 86 if (ret != EOK) { \ 87 ddf_msg(LVL_ERROR, message); \88 return ret; \89 } else (void)0 87 ps2_mouse_t *mouse = ddf_dev_data_alloc(device, sizeof(ps2_mouse_t)); 88 if (mouse == NULL) { 89 ddf_msg(LVL_ERROR, "Failed to allocate mouse driver instance."); 90 return ENOMEM; 91 } 90 92 91 ps2_mouse_t *mouse = ddf_dev_data_alloc(device, sizeof(ps2_mouse_t)); 92 int ret = (mouse == NULL) ? ENOMEM : EOK; 93 CHECK_RET_RETURN(ret, "Failed to allocate mouse driver instance."); 94 95 ret = ps2_mouse_init(mouse, device); 96 CHECK_RET_RETURN(ret, 97 "Failed to initialize mouse driver: %s.", str_error(ret)); 93 rc = ps2_mouse_init(mouse, device); 94 if (rc != EOK) { 95 ddf_msg(LVL_ERROR, "Failed to initialize mouse driver: %s.", 96 str_error(rc)); 97 return rc; 98 } 98 99 99 100 ddf_msg(LVL_NOTE, "Controlling '%s' (%" PRIun ").",
Note:
See TracChangeset
for help on using the changeset viewer.