Changeset 43e660c in mainline


Ignore:
Timestamp:
2012-08-13T13:57:15Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3a58347
Parents:
ea5cc5b
Message:

rtc: the client_connected bool field is not needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/time/cmos-rtc/cmos-rtc.c

    rea5cc5b r43e660c  
    7272        /** The I/O port used to access the CMOS registers */
    7373        ioport8_t *port;
    74         /** true if a client is connected to the device */
    75         bool client_connected;
    7674        /** true if device is removed */
    7775        bool removed;
     
    533531        ddf_fun_add_to_category(fun, "clock");
    534532
    535         rtc->client_connected = false;
    536 
    537533        ddf_msg(LVL_NOTE, "Device %s successfully initialized",
    538534            dev->name);
     
    561557
    562558        fibril_mutex_lock(&rtc->mutex);
    563         if (rtc->client_connected) {
    564                 fibril_mutex_unlock(&rtc->mutex);
    565                 return EBUSY;
    566         }
    567559
    568560        rtc->removed = true;
     
    617609        fibril_mutex_lock(&rtc->mutex);
    618610
    619         if (rtc->client_connected)
    620                 rc = ELIMIT;
    621         else if (rtc->removed)
     611        if (rtc->removed)
    622612                rc = ENXIO;
    623         else {
     613        else
    624614                rc = EOK;
    625                 rtc->client_connected = true;
    626         }
    627615
    628616        fibril_mutex_unlock(&rtc->mutex);
     
    637625rtc_close(ddf_fun_t *fun)
    638626{
    639         rtc_t *rtc = RTC_FROM_FNODE(fun);
    640 
    641         fibril_mutex_lock(&rtc->mutex);
    642 
    643         assert(rtc->client_connected);
    644         rtc->client_connected = false;
    645 
    646         fibril_mutex_unlock(&rtc->mutex);
    647627}
    648628
Note: See TracChangeset for help on using the changeset viewer.