Changeset 8565a42 in mainline for uspace/drv/hid/atkbd/atkbd.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/hid/atkbd/atkbd.c

    r3061bc1 r8565a42  
    205205        size_t nwr;
    206206        errno_t rc;
    207        
     207
    208208        while (true) {
    209209                uint8_t code = 0;
     
    211211                if (rc != EOK)
    212212                        return EIO;
    213                
     213
    214214                const unsigned int *map;
    215215                size_t map_size;
    216                
     216
    217217                if (code == KBD_SCANCODE_SET_EXTENDED) {
    218218                        map = scanmap_e0;
    219219                        map_size = sizeof(scanmap_e0) / sizeof(unsigned int);
    220                        
     220
    221221                        rc = chardev_read(kbd->chardev, &code, 1, &nwr);
    222222                        if (rc != EOK)
     
    270270                        map_size = sizeof(scanmap_simple) / sizeof(unsigned int);
    271271                }
    272                
     272
    273273                kbd_event_type_t type;
    274274                if (code == KBD_SCANCODE_KEY_RELEASE) {
     
    280280                        type = KEY_PRESS;
    281281                }
    282                
     282
    283283                const unsigned int key = (code < map_size) ? map[code] : 0;
    284                
     284
    285285                if (key != 0)
    286286                        push_event(kbd->client_sess, type, key);
     
    315315                async_sess_t *sess =
    316316                    async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    317                
     317
    318318                /* Probably ENOMEM error, try again. */
    319319                if (sess == NULL) {
     
    323323                        break;
    324324                }
    325                
     325
    326326                if (kbd->client_sess == NULL) {
    327327                        kbd->client_sess = sess;
     
    332332                        async_answer_0(icallid, ELIMIT);
    333333                }
    334                
     334
    335335                break;
    336336        }
     
    359359        async_sess_t *parent_sess;
    360360        errno_t rc;
    361        
     361
    362362        assert(kbd);
    363363        assert(dev);
    364        
     364
    365365        kbd->client_sess = NULL;
    366366        parent_sess = ddf_dev_parent_sess_get(dev);
     
    370370                goto error;
    371371        }
    372        
     372
    373373        rc = chardev_open(parent_sess, &kbd->chardev);
    374374        if (rc != EOK) {
     
    376376                return EIO;
    377377        }
    378        
     378
    379379        kbd->kbd_fun = ddf_fun_create(dev, fun_exposed, "kbd");
    380380        if (!kbd->kbd_fun) {
     
    382382                return ENOMEM;
    383383        }
    384        
     384
    385385        ddf_fun_set_ops(kbd->kbd_fun, &kbd_ops);
    386        
     386
    387387        errno_t ret = ddf_fun_bind(kbd->kbd_fun);
    388388        if (ret != EOK) {
     
    391391                return EEXIST;
    392392        }
    393        
     393
    394394        ret = ddf_fun_add_to_category(kbd->kbd_fun, "keyboard");
    395395        if (ret != EOK) {
     
    400400                return ENOMEM;
    401401        }
    402        
     402
    403403        kbd->polling_fibril = fibril_create(polling, kbd);
    404404        if (!kbd->polling_fibril) {
     
    408408                return ENOMEM;
    409409        }
    410        
     410
    411411        fibril_add_ready(kbd->polling_fibril);
    412412        return EOK;
Note: See TracChangeset for help on using the changeset viewer.