Changeset 5ff5dc5 in mainline


Ignore:
Timestamp:
2018-01-20T01:50:09Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cdaa7f
Parents:
ba654f2
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-20 01:47:27)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-20 01:50:09)
Message:

usbmid: just don't offline the ctl function

File:
1 edited

Legend:

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

    rba654f2 r5ff5dc5  
    142142static int usbmid_function_online(ddf_fun_t *fun)
    143143{
    144         /* TODO: What if this is the control function? */
     144        usb_device_t *usb_dev = ddf_dev_data_get(ddf_fun_get_dev(fun));
     145        usb_mid_t *usb_mid = usb_device_data_get(usb_dev);
     146        if (fun == usb_mid->ctl_fun)
     147                return ENOTSUP;
     148
    145149        return ddf_fun_online(fun);
    146150}
     
    148152static int usbmid_function_offline(ddf_fun_t *fun)
    149153{
    150         /* TODO: What if this is the control function? */
     154        usb_device_t *usb_dev = ddf_dev_data_get(ddf_fun_get_dev(fun));
     155        usb_mid_t *usb_mid = usb_device_data_get(usb_dev);
     156        if (fun == usb_mid->ctl_fun)
     157                return ENOTSUP;
     158
    151159        return ddf_fun_offline(fun);
    152160}
Note: See TracChangeset for help on using the changeset viewer.