Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/main.c

    rca48672 r6fbd1f9  
    11/*
    2  * Copyright (c) 2025 Jiri Svoboda
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    126126        ds_output_t *output = NULL;
    127127        gfx_context_t *gc = NULL;
    128         port_id_t port = 0;
     128        port_id_t disp_port;
     129        port_id_t gc_port;
     130        port_id_t wm_port;
     131        port_id_t dc_port;
    129132        loc_srv_t *srv = NULL;
    130133        service_id_t sid = 0;
     
    166169
    167170        rc = async_create_port(INTERFACE_DISPLAY, display_client_conn, disp,
    168             &port);
    169         if (rc != EOK)
    170                 goto error;
    171 
    172         rc = async_port_create_interface(port, INTERFACE_GC, display_gc_conn,
    173             disp);
    174         if (rc != EOK)
    175                 goto error;
    176 
    177         rc = async_port_create_interface(port, INTERFACE_WNDMGT,
    178             display_wndmgt_conn, disp);
    179         if (rc != EOK)
    180                 goto error;
    181 
    182         rc = async_port_create_interface(port, INTERFACE_DISPCFG,
    183             display_dispcfg_conn, disp);
     171            &disp_port);
     172        if (rc != EOK)
     173                goto error;
     174
     175        rc = async_create_port(INTERFACE_GC, display_gc_conn, disp, &gc_port);
     176        if (rc != EOK)
     177                goto error;
     178
     179        rc = async_create_port(INTERFACE_WNDMGT, display_wndmgt_conn, disp,
     180            &wm_port);
     181        if (rc != EOK)
     182                goto error;
     183
     184        rc = async_create_port(INTERFACE_DISPCFG, display_dispcfg_conn, disp,
     185            &dc_port);
    184186        if (rc != EOK)
    185187                goto error;
     
    192194        }
    193195
    194         rc = loc_service_register(srv, SERVICE_NAME_DISPLAY, port, &sid);
     196        rc = loc_service_register(srv, SERVICE_NAME_DISPLAY, &sid);
    195197        if (rc != EOK) {
    196198                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
     
    206208        if (srv != NULL)
    207209                loc_server_unregister(srv);
    208         if (port != 0)
    209                 async_port_destroy(port);
     210        // XXX destroy disp_port
     211        // XXX destroy gc_port
     212        // XXX destroy wm_port
     213        // XXX destroy dc_port
    210214#if 0
    211215        if (disp->input != NULL)
Note: See TracChangeset for help on using the changeset viewer.