Changeset 8565a42 in mainline for kernel/genarch/src/kbrd/kbrd.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
  • kernel/genarch/src/kbrd/kbrd.c

    r3061bc1 r8565a42  
    7878{
    7979        spinlock_lock(&instance->keylock);
    80        
     80
    8181        switch (sc) {
    8282        case SC_LSHIFT:
     
    9494                break;
    9595        }
    96        
     96
    9797        spinlock_unlock(&instance->keylock);
    9898}
     
    108108        bool capslock;
    109109        wchar_t ch;
    110        
     110
    111111        spinlock_lock(&instance->keylock);
    112        
     112
    113113        switch (sc) {
    114114        case SC_LSHIFT:
     
    126126                capslock = (instance->keyflags & PRESSED_CAPSLOCK) ||
    127127                    (instance->lockflags & LOCKED_CAPSLOCK);
    128                
     128
    129129                if ((letter) && (capslock))
    130130                        shift = !shift;
    131                
     131
    132132                if (shift)
    133133                        ch = sc_secondary_map[sc];
    134134                else
    135135                        ch = sc_primary_map[sc];
    136                
     136
    137137                switch (ch) {
    138138                case U_PAGE_UP:
     
    145145                        indev_push_character(instance->sink, ch);
    146146                }
    147                
    148                 break;
    149         }
    150        
     147
     148                break;
     149        }
     150
    151151        spinlock_unlock(&instance->keylock);
    152152}
     
    155155{
    156156        kbrd_instance_t *instance = (kbrd_instance_t *) arg;
    157        
     157
    158158        while (true) {
    159159                wchar_t sc = indev_pop_character(&instance->raw);
    160                
     160
    161161                if (sc == IGNORE_CODE)
    162162                        continue;
    163                
     163
    164164                if (sc & KEY_RELEASE)
    165165                        key_released(instance, (sc ^ KEY_RELEASE) & 0x7f);
     
    176176                instance->thread = thread_create(kkbrd, (void *) instance,
    177177                    TASK, THREAD_FLAG_NONE, "kkbrd");
    178                
     178
    179179                if (!instance->thread) {
    180180                        free(instance);
    181181                        return NULL;
    182182                }
    183                
     183
    184184                instance->sink = NULL;
    185185                indev_initialize("kbrd", &instance->raw, &kbrd_raw_ops);
    186                
     186
    187187                spinlock_initialize(&instance->keylock, "kbrd.instance.keylock");
    188188                instance->keyflags = 0;
    189189                instance->lockflags = 0;
    190190        }
    191        
     191
    192192        return instance;
    193193}
     
    197197        assert(instance);
    198198        assert(sink);
    199        
     199
    200200        instance->sink = sink;
    201201        thread_ready(instance->thread);
    202        
     202
    203203        return &instance->raw;
    204204}
Note: See TracChangeset for help on using the changeset viewer.