Ignore:
Timestamp:
2023-12-28T13:59:23Z (22 months ago)
Author:
GitHub <noreply@…>
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)
Message:

Merge branch 'master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c

    r42c2e65 rdc5c303  
    11/*
    2  * Copyright (c) 2010 Jiri Svoboda
     2 * Copyright (c) 2023 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3939#include <ddi.h>
    4040#include <loc.h>
    41 #include <io/console.h>
    4241#include <vfs/vfs.h>
    4342#include <ipc/mouseev.h>
     
    8180int main(int argc, char *argv[])
    8281{
     82        loc_srv_t *srv;
     83
    8384        printf("%s: S3C24xx touchscreen driver\n", NAME);
    8485
    8586        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);
    8788        if (rc != EOK) {
    8889                printf("%s: Unable to register driver.\n", NAME);
     
    9192
    9293        ts = malloc(sizeof(s3c24xx_ts_t));
    93         if (ts == NULL)
     94        if (ts == NULL) {
     95                loc_server_unregister(srv);
    9496                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);
    97102                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);
    100106        if (rc != EOK) {
     107                // XXX s3c24xx_ts_fini();
     108                free(ts);
     109                loc_server_unregister(srv);
    101110                printf(NAME ": Unable to register device %s.\n",
    102111                    NAMESPACE "/mouse");
Note: See TracChangeset for help on using the changeset viewer.