Ignore:
Timestamp:
2011-09-14T19:25:06Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bdd8ad2f
Parents:
56e9fb0
Message:

usb: Use new target packing scheme for IPC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usbhc.c

    r56e9fb0 r365e29e2  
    238238        }
    239239
    240         usb_target_t target = {
    241                 {.address = DEV_IPC_GET_ARG1(*call),
    242                 .endpoint = DEV_IPC_GET_ARG2(*call) }
    243         };
    244         size_t data_buffer_len = DEV_IPC_GET_ARG3(*call);
     240        const usb_target_t target = { .packed = DEV_IPC_GET_ARG1(*call) };
     241        size_t data_buffer_len = DEV_IPC_GET_ARG2(*call);
    245242
    246243        int rc;
     
    302299        }
    303300
    304         usb_target_t target = {{
    305                 .address = DEV_IPC_GET_ARG1(*call),
    306                 .endpoint = DEV_IPC_GET_ARG2(*call)
    307         }};
     301        const usb_target_t target = { .packed = DEV_IPC_GET_ARG1(*call) };
    308302
    309303        int rc;
     
    379373        type var = (type) DEV_IPC_GET_ARG##arg_no(*call) % (1 << 8)
    380374
    381         _INIT_FROM_HIGH_DATA2(usb_address_t, address, 1);
    382         _INIT_FROM_LOW_DATA2(usb_endpoint_t, endpoint, 1);
     375        const usb_target_t target = { .packed = DEV_IPC_GET_ARG1(*call) };
    383376
    384377        _INIT_FROM_HIGH_DATA3(usb_speed_t, speed, 2);
     
    395388#undef _INIT_FROM_LOW_DATA3
    396389
    397         int rc = usb_iface->register_endpoint(fun, address, speed, endpoint,
     390        int rc = usb_iface->register_endpoint(fun, target.address,
     391            speed, target.endpoint,
    398392            transfer_type, direction, max_packet_size, interval);
    399393
     
    436430        }
    437431
    438         const usb_target_t target = {{
    439                 .address = DEV_IPC_GET_ARG1(*call),
    440                 .endpoint = DEV_IPC_GET_ARG2(*call)
    441         }};
    442 
     432        const usb_target_t target = { .packed = DEV_IPC_GET_ARG1(*call) };
    443433
    444434        async_transaction_t *trans = async_transaction_create(callid);
     
    484474        }
    485475
    486         const usb_target_t target = {{
    487                 .address = DEV_IPC_GET_ARG1(*call),
    488                 .endpoint = DEV_IPC_GET_ARG2(*call)
    489         }};
    490 
     476        const usb_target_t target = { .packed = DEV_IPC_GET_ARG1(*call) };
    491477
    492478        async_transaction_t *trans = async_transaction_create(callid);
Note: See TracChangeset for help on using the changeset viewer.