Changeset 5159ae9 in mainline for uspace/lib/drv/generic/driver.c


Ignore:
Timestamp:
2010-05-29T08:37:38Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ce89036b
Parents:
692c40cb
Message:

Rename 'device_class' structure to a more appropriate 'device_ops'. The device_class structure has nothing in common with the device classes introduced by the previous commit and it evolved to just a set of callback functions.

File:
1 edited

Legend:

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

    r692c40cb r5159ae9  
    224224        int ret = EOK;
    225225        // open the device
    226         if (NULL != dev->class && NULL != dev->class->open) {
    227                 ret = (*dev->class->open)(dev);
     226        if (NULL != dev->ops && NULL != dev->ops->open) {
     227                ret = (*dev->ops->open)(dev);
    228228        }
    229229       
     
    240240                case IPC_M_PHONE_HUNGUP:               
    241241                        // close the device
    242                         if (NULL != dev->class && NULL != dev->class->close) {
    243                                 (*dev->class->close)(dev);
     242                        if (NULL != dev->ops && NULL != dev->ops->close) {
     243                                (*dev->ops->close)(dev);
    244244                        }                       
    245245                        ipc_answer_0(callid, EOK);
Note: See TracChangeset for help on using the changeset viewer.