Changeset dc5c303 in mainline for uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
- Timestamp:
- 2023-12-28T13:59:23Z (22 months ago)
- Children:
- 6b66de6b
- Parents:
- 42c2e65 (diff), f87ff8e (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. - git-author:
- boba-buba <120932204+boba-buba@…> (2023-12-28 13:59:23)
- git-committer:
- GitHub <noreply@…> (2023-12-28 13:59:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
r42c2e65 rdc5c303 1 1 /* 2 * Copyright (c) 20 10Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 39 39 #include <ddi.h> 40 40 #include <loc.h> 41 #include <io/console.h>42 41 #include <vfs/vfs.h> 43 42 #include <ipc/mouseev.h> … … 81 80 int main(int argc, char *argv[]) 82 81 { 82 loc_srv_t *srv; 83 83 84 printf("%s: S3C24xx touchscreen driver\n", NAME); 84 85 85 86 async_set_fallback_port_handler(s3c24xx_ts_connection, NULL); 86 errno_t rc = loc_server_register(NAME );87 errno_t rc = loc_server_register(NAME, &srv); 87 88 if (rc != EOK) { 88 89 printf("%s: Unable to register driver.\n", NAME); … … 91 92 92 93 ts = malloc(sizeof(s3c24xx_ts_t)); 93 if (ts == NULL) 94 if (ts == NULL) { 95 loc_server_unregister(srv); 94 96 return -1; 95 96 if (s3c24xx_ts_init(ts) != EOK) 97 } 98 99 if (s3c24xx_ts_init(ts) != EOK) { 100 free(ts); 101 loc_server_unregister(srv); 97 102 return -1; 98 99 rc = loc_service_register(NAMESPACE "/mouse", &ts->service_id); 103 } 104 105 rc = loc_service_register(srv, NAMESPACE "/mouse", &ts->service_id); 100 106 if (rc != EOK) { 107 // XXX s3c24xx_ts_fini(); 108 free(ts); 109 loc_server_unregister(srv); 101 110 printf(NAME ": Unable to register device %s.\n", 102 111 NAMESPACE "/mouse");
Note:
See TracChangeset
for help on using the changeset viewer.