Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 135486d in mainline for uspace/drv/bus/usb/usbmast/main.c


Ignore:
Timestamp:
2012-08-15T14:44:59Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
affaf2e, b546231
Parents:
4802dd7
Message:

Allow more than one client connection to block device.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/main.c

    r4802dd7 r135486d  
    8282    void *arg);
    8383
    84 static int usbmast_bd_open(bd_srv_t *);
     84static int usbmast_bd_open(bd_srvs_t *, bd_srv_t *);
    8585static int usbmast_bd_close(bd_srv_t *);
    8686static int usbmast_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     
    100100static usbmast_fun_t *bd_srv_usbmast(bd_srv_t *bd)
    101101{
    102         return (usbmast_fun_t *)bd->arg;
     102        return (usbmast_fun_t *)bd->srvs->sarg;
    103103}
    104104
     
    240240        mfun->lun = lun;
    241241
    242         bd_srv_init(&mfun->bd);
    243         mfun->bd.ops = &usbmast_bd_ops;
    244         mfun->bd.arg = mfun;
     242        bd_srvs_init(&mfun->bds);
     243        mfun->bds.ops = &usbmast_bd_ops;
     244        mfun->bds.sarg = mfun;
    245245
    246246        /* Set up a connection handler. */
     
    311311
    312312        mfun = (usbmast_fun_t *) ((ddf_fun_t *)arg)->driver_data;
    313         bd_conn(iid, icall, &mfun->bd);
     313        bd_conn(iid, icall, &mfun->bds);
    314314}
    315315
    316316/** Open device. */
    317 static int usbmast_bd_open(bd_srv_t *bd)
     317static int usbmast_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    318318{
    319319        return EOK;
Note: See TracChangeset for help on using the changeset viewer.