Changeset 1c6c3e1d in mainline for uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
- Timestamp:
- 2023-10-22T17:55:33Z (15 months ago)
- Branches:
- ticket/834-toolchain-update
- Children:
- 350ec74
- Parents:
- 315d487 (diff), 133461c (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/srv/hid/s3c24xx_ts/s3c24xx_ts.c
r315d487 r1c6c3e1d 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.