Changeset 4c6fd56 in mainline for uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
- Timestamp:
- 2023-09-16T19:58:18Z (16 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7d7f5e3
- Parents:
- 6a0b2cc
- git-author:
- Jiri Svoboda <jiri@…> (2023-09-16 19:48:07)
- git-committer:
- Jiri Svoboda <jiri@…> (2023-09-16 19:58:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
r6a0b2cc r4c6fd56 1 1 /* 2 * Copyright (c) 20 10Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 81 81 int main(int argc, char *argv[]) 82 82 { 83 loc_srv_t *srv; 84 83 85 printf("%s: S3C24xx touchscreen driver\n", NAME); 84 86 85 87 async_set_fallback_port_handler(s3c24xx_ts_connection, NULL); 86 errno_t rc = loc_server_register(NAME );88 errno_t rc = loc_server_register(NAME, &srv); 87 89 if (rc != EOK) { 88 90 printf("%s: Unable to register driver.\n", NAME); … … 91 93 92 94 ts = malloc(sizeof(s3c24xx_ts_t)); 93 if (ts == NULL) 95 if (ts == NULL) { 96 loc_server_unregister(srv); 94 97 return -1; 95 96 if (s3c24xx_ts_init(ts) != EOK) 98 } 99 100 if (s3c24xx_ts_init(ts) != EOK) { 101 free(ts); 102 loc_server_unregister(srv); 97 103 return -1; 98 99 rc = loc_service_register(NAMESPACE "/mouse", &ts->service_id); 104 } 105 106 rc = loc_service_register(srv, NAMESPACE "/mouse", &ts->service_id); 100 107 if (rc != EOK) { 108 // XXX s3c24xx_ts_fini(); 109 free(ts); 110 loc_server_unregister(srv); 101 111 printf(NAME ": Unable to register device %s.\n", 102 112 NAMESPACE "/mouse");
Note:
See TracChangeset
for help on using the changeset viewer.