Changeset 196fbb0 in mainline


Ignore:
Timestamp:
2011-10-12T18:57:06Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6626bba9
Parents:
940f576
Message:

usbhub: Store hub function ptr within hub structure.

Location:
uspace/drv/bus/usb/usbhub
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/usbhub.c

    r940f576 r196fbb0  
    136136
    137137        usb_log_debug("Creating DDF function '" HUB_FNC_NAME "'.\n");
    138         ddf_fun_t *hub_fun = ddf_fun_create(hub_info->usb_device->ddf_dev,
     138        hub_info->hub_fun = ddf_fun_create(hub_info->usb_device->ddf_dev,
    139139            fun_exposed, HUB_FNC_NAME);
    140         if (hub_fun == NULL) {
     140        if (hub_info->hub_fun == NULL) {
    141141                usb_log_error("Failed to create hub function.\n");
    142142                free(hub_info);
     
    144144        }
    145145
    146         opResult = ddf_fun_bind(hub_fun);
     146        opResult = ddf_fun_bind(hub_info->hub_fun);
    147147        if (opResult != EOK) {
    148148                usb_log_error("Failed to bind hub function: %s.\n",
    149149                   str_error(opResult));
    150150                free(hub_info);
    151                 ddf_fun_destroy(hub_fun);
     151                ddf_fun_destroy(hub_info->hub_fun);
    152152                return opResult;
    153153        }
     
    157157            usb_hub_polling_terminated_callback, hub_info);
    158158        if (opResult != EOK) {
    159                 ddf_fun_destroy(hub_fun);
     159                ddf_fun_destroy(hub_info->hub_fun);
    160160                free(hub_info);
    161161                usb_log_error("Failed to create polling fibril: %s.\n",
  • uspace/drv/bus/usb/usbhub/usbhub.h

    r940f576 r196fbb0  
    7676        /** Condition variable for pending_ops_count. */
    7777        fibril_condvar_t pending_ops_cv;
     78        ddf_fun_t *hub_fun;
    7879};
    7980
Note: See TracChangeset for help on using the changeset viewer.