Ignore:
Timestamp:
2011-09-07T00:03:26Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5081276
Parents:
bb74dabe (diff), 038b289 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/multimedia/multimedia.c

    rbb74dabe rc05642d  
    167167/*----------------------------------------------------------------------------*/
    168168
    169 static void usb_multimedia_free(usb_multimedia_t **multim_dev)
    170 {
    171         if (multim_dev == NULL || *multim_dev == NULL) {
    172                 return;
    173         }
    174        
    175         // hangup phone to the console
    176         async_obsolete_hangup((*multim_dev)->console_phone);
    177 
    178         free(*multim_dev);
    179         *multim_dev = NULL;
    180 }
    181 
    182 /*----------------------------------------------------------------------------*/
    183 
    184169static int usb_multimedia_create_function(usb_hid_dev_t *hid_dev,
    185170    usb_multimedia_t *multim_dev)
     
    247232       
    248233        int rc = usb_multimedia_create_function(hid_dev, multim_dev);
    249         if (rc != EOK) {
    250                 usb_multimedia_free(&multim_dev);
     234        if (rc != EOK)
    251235                return rc;
    252         }
    253236       
    254237        usb_log_debug(NAME " HID/multimedia structure initialized.\n");
     
    267250        if (data != NULL) {
    268251                usb_multimedia_t *multim_dev = (usb_multimedia_t *)data;
    269                 usb_multimedia_free(&multim_dev);
     252                // hangup phone to the console
     253                async_obsolete_hangup(multim_dev->console_phone);
    270254        }
    271255}
Note: See TracChangeset for help on using the changeset viewer.