Ignore:
File:
1 edited

Legend:

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

    r6fbd1f9 rca48672  
    11/*
    2  * Copyright (c) 2024 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    126126        ds_output_t *output = NULL;
    127127        gfx_context_t *gc = NULL;
    128         port_id_t disp_port;
    129         port_id_t gc_port;
    130         port_id_t wm_port;
    131         port_id_t dc_port;
     128        port_id_t port = 0;
    132129        loc_srv_t *srv = NULL;
    133130        service_id_t sid = 0;
     
    169166
    170167        rc = async_create_port(INTERFACE_DISPLAY, display_client_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);
     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);
    186184        if (rc != EOK)
    187185                goto error;
     
    194192        }
    195193
    196         rc = loc_service_register(srv, SERVICE_NAME_DISPLAY, &sid);
     194        rc = loc_service_register(srv, SERVICE_NAME_DISPLAY, port, &sid);
    197195        if (rc != EOK) {
    198196                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc));
     
    208206        if (srv != NULL)
    209207                loc_server_unregister(srv);
    210         // XXX destroy disp_port
    211         // XXX destroy gc_port
    212         // XXX destroy wm_port
    213         // XXX destroy dc_port
     208        if (port != 0)
     209                async_port_destroy(port);
    214210#if 0
    215211        if (disp->input != NULL)
Note: See TracChangeset for help on using the changeset viewer.