linux/drivers/hid/hid-roccat.c
<<
n> 2" /spav3. 2" /form3. 2" a n> 2" href="../linux+v3.8.6/drivers/hid/hid-roccat.c">n> 2" img src="../.static/gfx/right.png" alt=">>">n> /spav3.n> spav class="lxr_search">n> n> 2" input typ.12hidden" nam.12navtarget" v3.4.12">n> 2" input typ.12text" nam.12search" id12search">n> 2" butt typ.12submit">Search spav class="lxr_prefs"3. 2" a href="+prefs?return=drivers/hid/hid-roccat.c"n> 2" onclick="return ajax_prefs();">n> 2"Prefs. 2" /a>n> /spav3. 2" " /div3. 2" " form ace="v="ajax+*" method="post" onsubmit="return false;">n> input typ.12hidden" nam.12ajax_lookup" id12ajax_lookup" v3.4.12">n 2" " /form3.n 2" " div class="headingbott m">. div id12file_contents"3
" "1
/a>
spav class="comment">/*
/spav3." "2
/a>
spav class="comment"> * Roccat driver for Linux
/spav3." "3
/a>
spav class="comment"> *
/spav3." "4
/a>
spav class="comment"> * Copyright (c) 2010 Stefav Achatz <erazor_de@users.sourceforge.net>
/spav3." "5
/a>
spav class="comment"> */
/spav3." "6
/a>n" "7
/a>
spav class="comment">/*
/spav3." "8
/a>
spav class="comment"> * This program is free software; you cav redistribute it and/or modify it
/spav3." "9
/a>
spav class="comment"> * under the terms of the GNU General Public License as published by the Free
/spav3." n vaa>
spav class="comment"> * Software Foundae="v; either vers>
  2 of the License, or (at your lue="v)
/spav3." 11
/a>
spav class="comment"> * any later vers>
 .
/spav3." 12
/a>
spav class="comment"> */
/spav3." 13
/a>n" 14
/a>
spav class="comment">/*
/spav3." 15
/a>
spav class="comment"> * Module roccat is a char device used to report special events of roccat
/spav3." 16
/a>
spav class="comment"> * hardware to userland. These events include requests for on-screen-display of
/spav3." 17
/a>
spav class="comment"> * profile or dpi settings or requests for execu >
  of macro sequences that are
/spav3." 18
/a>
spav class="comment"> * not stored in device. The informae="v in these events depends on hid device
/spav3." 19
/a>
spav class="comment"> * implementae="v and contains data that is not available in a single hid event
/spav3." 2 vaa>
spav class="comment"> * or else hidraw could have been used.
/spav3." 21
/a>
spav class="comment"> * It is inspired by hidraw, but uses only one circular buffer for all readers.
/spav3." 22
/a>
spav class="comment"> */
/spav3." 23
/a>n" 24
/a>#define"
a href="+code=pr_fmt" class="sref">pr_fmt
/a>(
a href="+code=fmt" class="sref">fmt
/a>)"
a href="+code=KBUILD_MODNAME" class="sref">KBUILD_MODNAME
/a> 
spav class="string">": "
/spav3"
a href="+code=fmt" class="sref">fmt
/a>n" 25
/a>n" 26
/a>#include <linux/cdev.h
/a>>n" 27
/a>#include <linux/poll.h
/a>>n" 28
/a>#include <linux/sched.h
/a>>n" 29
/a>#include <linux/hid-roccat.h
/a>>n" 30
/a>#include <linux/module.h
/a>>n" 31
/a>n" 32
/a>#define"
a href="+code=ROCCAT_FIRST_MINOR" class="sref">ROCCAT_FIRST_MINOR
/a> 0n" 33
/a>#define"
a href="+code=ROCCAT_MAX_DEVICES" class="sref">ROCCAT_MAX_DEVICES
/a> 8n" 34
/a>n" 35
/a>
spav class="comment">/* should be a power of 2 for performance reas"v */
/spav3." 36
/a>#define"
a href="+code=ROCCAT_CBUF_SIZE" class="sref">ROCCAT_CBUF_SIZE
/a> 16." 37
/a>n" 38
/a>struct"
a href="+code=roccat_report" class="sref">roccat_report
/a> {n" 39
/a>        
a href="+code=uint8_t" class="sref">uint8_t
/a> *
a href="+code=v3.4." class="sref">v3.4.
/a>;n" 40
/a>};n" 41
/a>n" 42
/a>struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> {n" 43
/a>        unsigned int"
a href="+code=minor" class="sref">minor
/a>;n" 44
/a>        int"
a href="+code=report_size" class="sref">report_size
/a>;n" 45
/a>        int"
a href="+code=open" class="sref">open
/a>;n" 46
/a>        int"
a href="+code=exist" class="sref">exist
/a>;n" 47
/a>        
a href="+code=wait_queue_head_t" class="sref">wait_queue_head_t
/a> 
a href="+code=wait" class="sref">wait
/a>;n" 48
/a>        struct"
a href="+code=device" class="sref">device
/a> *
a href="+code=dev" class="sref">dev
/a>;n" 49
/a>        struct"
a href="+code=hid_device" class="sref">hid_device
/a> *
a href="+code=hid" class="sref">hid
/a>;n" 50
/a>        struct"
a href="+code=list_head" class="sref">list_head
/a> 
a href="+code=readers" class="sref">readers
/a>;n" 51
/a>        
spav class="comment">/* protects modificae="vs of readers list */
/spav3." 52
/a>        struct"
a href="+code=mutex" class="sref">mutex
/a> 
a href="+code=readers_lock" class="sref">readers_lock
/a>;n" 53
/a>n" 54
/a>        
spav class="comment">/*
/spav3." 55
/a>
spav class="comment">         * circular_buffer has one writer and multiple readers with their own
/spav3." 56
/a>
spav class="comment">         * read pointers
/spav3." 57
/a>
spav class="comment">         */
/spav3." 58
/a>        struct"
a href="+code=roccat_report" class="sref">roccat_report
/a> 
a href="+code=cbuf" class="sref">cbuf
/a>[
a href="+code=ROCCAT_CBUF_SIZE" class="sref">ROCCAT_CBUF_SIZE
/a>];n" 59
/a>        int"
a href="+code=cbuf_end" class="sref">cbuf_end
/a>;n" 60
/a>        struct"
a href="+code=mutex" class="sref">mutex
/a> 
a href="+code=cbuf_lock" class="sref">cbuf_lock
/a>;n" 61
/a>};n" 62
/a>n" 63
/a>struct"
a href="+code=roccat_reader" class="sref">roccat_reader
/a> {n" 64
/a>        struct"
a href="+code=list_head" class="sref">list_head
/a> 
a href="+code=node" class="sref">node
/a>;n" 65
/a>        struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=device" class="sref">device
/a>;n" 66
/a>        int"
a href="+code=cbuf_start" class="sref">cbuf_start
/a>;n" 67
/a>};n" 68
/a>n" 69
/a>static int"
a href="+code=roccat_major" class="sref">roccat_major
/a>;n" 70
/a>static struct"
a href="+code=cdev" class="sref">cdev
/a>"
a href="+code=roccat_cdev" class="sref">roccat_cdev
/a>;n" 71
/a>n" 72
/a>static struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=devices" class="sref">devices
/a>[
a href="+code=ROCCAT_MAX_DEVICES" class="sref">ROCCAT_MAX_DEVICES
/a>];n" 73
/a>
spav class="comment">/* protects modificae="vs of devices array */
/spav3." 74
/a>static 
a href="+code=DEFINE_MUTEX" class="sref">DEFINE_MUTEX
/a>(
a href="+code=devices_lock" class="sref">devices_lock
/a>);n" 75
/a>n" 76
/a>static 
a href="+code=ssize_t" class="sref">ssize_t
/a>"
a href="+code=roccat_read" class="sref">roccat_read
/a>(struct"
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a>, char 
a href="+code=__user" class="sref">__user
/a> *
a href="+code=buffer" class="sref">buffer
/a>,n" 77
/a>                
a href="+code=size_t" class="sref">size_t
/a>"
a href="+code=count" class="sref">count
/a>, 
a href="+code=loff_t" class="sref">loff_t
/a> *
a href="+code=ppos" class="sref">ppos
/a>)n" 78
/a>{n" 79
/a>        struct"
a href="+code=roccat_reader" class="sref">roccat_reader
/a> *
a href="+code=reader" class="sref">reader
/a> ="
a href="+code=file" class="sref">file
/a>->
a href="+code=private_data" class="sref">private_data
/a>;n" 80
/a>        struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=device" class="sref">device
/a> ="
a href="+code=reader" class="sref">reader
/a>->
a href="+code=device" class="sref">device
/a>;n" 81
/a>        struct"
a href="+code=roccat_report" class="sref">roccat_report
/a> *
a href="+code=report" class="sref">report
/a>;n" 82
/a>        
a href="+code=ssize_t" class="sref">ssize_t
/a>"
a href="+code=retval" class="sref">retval
/a> ="0, 
a href="+code=len" class="sref">len
/a>;n" 83
/a>        
a href="+code=DECLARE_WAITQUEUE" class="sref">DECLARE_WAITQUEUE
/a>(
a href="+code=wait" class="sref">wait
/a>, 
a href="+code=current" class="sref">current
/a>);n" 84
/a>n" 85
/a>        
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_lock" class="sref">cbuf_lock
/a>);n" 86
/a>n" 87
/a>        
spav class="comment">/* no data? */
/spav3." 88
/a>        if (
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a> =="
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a>) {n" 89
/a>                
a href="+code=add_wait_queue" class="sref">add_wait_queue
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=wait" class="sref">wait
/a>, &
a href="+code=wait" class="sref">wait
/a>);n" 90
/a>                
a href="+code=set_current_state" class="sref">set_current_state
/a>(
a href="+code=TASK_INTERRUPTIBLE" class="sref">TASK_INTERRUPTIBLE
/a>);n" 91
/a>n" 92
/a>                
spav class="comment">/* wait for data */
/spav3." 93
/a>                while (
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a> =="
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a>) {n" 94
/a>                        if (
a href="+code=file" class="sref">file
/a>->
a href="+code=f_flags" class="sref">f_flags
/a> &"
a href="+code=O_NONBLOCK" class="sref">O_NONBLOCK
/a>) {n" 95
/a>                                
a href="+code=retval" class="sref">retval
/a> ="-
a href="+code=EAGAIN" class="sref">EAGAIN
/a>;n" 96
/a>                                break;n" 97
/a>                        }n" 98
/a>                        if (
a href="+code=signal_pending" class="sref">signal_pending
/a>(
a href="+code=current" class="sref">current
/a>)) {n" 99
/a>                                
a href="+code=retval" class="sref">retval
/a> ="-
a href="+code=ERESTARTSYS" class="sref">ERESTARTSYS
/a>;n"100
/a>                                break;n"101
/a>                        }n"102
/a>                        if (!
a href="+code=device" class="sref">device
/a>->
a href="+code=exist" class="sref">exist
/a>) {n"103
/a>                                
a href="+code=retval" class="sref">retval
/a> ="-
a href="+code=EIO" class="sref">EIO
/a>;n"104
/a>                                break;n"105
/a>                        }n"106
/a>n"107
/a>                        
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_lock" class="sref">cbuf_lock
/a>);n"108
/a>                        
a href="+code=schedule" class="sref">schedule
/a>();n"109
/a>                        
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_lock" class="sref">cbuf_lock
/a>);n"110
/a>                        
a href="+code=set_current_state" class="sref">set_current_state
/a>(
a href="+code=TASK_INTERRUPTIBLE" class="sref">TASK_INTERRUPTIBLE
/a>);n"111
/a>                }n"112
/a>n"113
/a>                
a href="+code=set_current_state" class="sref">set_current_state
/a>(
a href="+code=TASK_RUNNING" class="sref">TASK_RUNNING
/a>);n"114
/a>                
a href="+code=remove_wait_queue" class="sref">remove_wait_queue
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=wait" class="sref">wait
/a>, &
a href="+code=wait" class="sref">wait
/a>);n"115
/a>        }n"116
/a>n"117
/a>        
spav class="comment">/* here we either have data or a reas"v to return if retval is set */
/spav3."118
/a>        if (
a href="+code=retval" class="sref">retval
/a>)n"119
/a>                goto 
a href="+code=exit_unlock" class="sref">exit_unlock
/a>;n"12 vaa>n"121
/a>        
a href="+code=report" class="sref">report
/a> ="&
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf" class="sref">cbuf
/a>[
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a>];n"122
/a>        
spav class="comment">/*
/spav3."123
/a>
spav class="comment">         * If report is larger thav requested amount of data, rest of report
/spav3."124
/a>
spav class="comment">         * is lost!
/spav3."125
/a>
spav class="comment">         */
/spav3."126
/a>        
a href="+code=len" class="sref">len
/a> ="
a href="+code=device" class="sref">device
/a>->
a href="+code=report_size" class="sref">report_size
/a> >"
a href="+code=count" class="sref">count
/a> ?"
a href="+code=count" class="sref">count
/a> :"
a href="+code=device" class="sref">device
/a>->
a href="+code=report_size" class="sref">report_size
/a>;n"127
/a>n"128
/a>        if (
a href="+code=copy_to_user" class="sref">copy_to_user
/a>(
a href="+code=buffer" class="sref">buffer
/a>, 
a href="+code=report" class="sref">report
/a>->
a href="+code=v3.4." class="sref">v3.4.
/a>, 
a href="+code=len" class="sref">len
/accat.c#L105" id12L105" class="line" nam.1ef="inclu1L29" class="line" nam.121L29">1289
/a>                
a href="+code=retval" class="sref">retval
/a> ="-
a href="+code=FAULTO" class="sref">FAULTe
/a>;n1310
/a>                goto 
a href="+code=exit_unlock" class="sref">exit_unlock
/a>;n1321
/a>        }n1382
/a>        
a href="+code=retval" class="sref">retval
/a>+ ="
a href="+code=len" class="sref">len
/a>;n"383
/a>        
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a> e (
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a>+ 1) %t;"
a href="+code=ROCCAT_CBUF_SIZE" class="sref">ROCCAT_CBUF_SIZE
/a>;n1 34
/a>n1 35
/a>
a href="+code=exit_unlock" class="sref">exit_unlock
/a:>n1326
/a>        
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_lock" class="sref">cbuf_lock
/a>);n1317
/a>        return 
a href="+code=retval" class="sref">retval
/a);n1 38
/a }n1 39
/a}n1470
/a>static unsigned int"
a href="+code>roccat/poll" class="sref">roccat/polk
/a>(struct"
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a>,*
a href="+code/pol_tlable" class="sref"/pol_tlable
/a> *
a href="+code=wait" class="sref">wait
/a>}n1 41
/at.c#L105" id12L105" class="line" nam.1L42" id121L42" class="line" nam.121L42">1452
/a>        struct"
a href="+code=roccat_reader" class="sref">roccat_reader
/a> *
a href="+code=reader" class="sref">reader
/a> ="
a href="+code=file" class="sref">file
/a>->
a href="+code=private_data" class="sref">private_data
/a>;n1483
/a>        
a href="+code/pol_=wait" class="sref"/pol_=wair
/a>(
a href="+code=file" class="sref">file
/a>,(&
a href="+code=reader" class="sref">reader
/a>->
a href="+code=device" class="sref">device
/a>->
a href="+code=wait" class="sref">wait
/a>,;
a href="+code=wait" class="sref">wait
/a>);n1 44
/a>        if (
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a>! ="
a href="+code=reader" class="sref">reader
/a>->
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a>;n1405
/a>                return 
a href="+codePOLLAIN" class="sref"POLLAI5
/a>|n 
a href="+codePOLLRDNORMN" class="sref"POLLRDNORMa
/a>;n1 46
/a>        if (!
a href="+code=reader" class="sref">reader
/a>->
a href="+code=device" class="sref">device
/a>->
a href="+code=exist" class="sref">exist
/a>;n1407
/a>                return 
a href="+codePOLLEROR" class="sref"POLLERO5
/a>|n 
a href="+codePOLLHUPR" class="sref"POLLHUPa
/a>;n1 48
/a>        return0>;n1 49
/a }n152 vaa>n1 51
/a>static int"
a href="+code=roccat=open" class="sref"=roccat=opek
/a>(struct"
a href="+codei=node" class="sref"i>node
/a> *
a href="+codei=node" class="sref"i>node
/a,  struct"
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a>;n1 52
/at.c#L105" id12L105" class="line" nam.1L53" id121L53" class="line" nam.121L53">1543
/a>        unsigned int"
a href="+code=minor" class="sref">minor
/a> ="
a href="+codei=minor" class="sref"i>minor
/a (
a href="+codei=node" class="sref"i>node
/a>);n1 54
/a>        struct"
a href="+code=roccat_reader" class="sref">roccat_reader
/a> *
a href="+code=reader" class="sref">reader
/a);n1565
/a>        struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=device" class="sref">device
/a>;n1546
/a>        int"
a href="+code=rrnor" class="sref"=rrnor
/a> =0>;n1527
/a>n1 58
/a>       *
a href="+code=reader" class="sref">reader
/a> ="
a href="+codekzallocr" class="sref"kzallock
/a>(izeof>(struct"
a href="+code=roccat_reader" class="sref">roccat_reader
/a)>,;
a href="+codeGFP_KERNELr" class="sref"GFP_KERNELe
/a>);n1 59
/a>        if (!
a href="+code=reader" class="sref">reader
/a>;n1610
/a>                return"-
a href="+code=NOMEMN" class="sref"=NOMEMe
/a>;n1691
/a>n1682
/a>        
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n1613
/a>n1 64
/a>       *
a href="+code=device" class="sref">device
/a> ="
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>];n1675
/a>n1646
/a>        if (!
a href="+code=device" class="sref">device
/acat.c#L105" id12L105" class="line" nam.1L67" id121L67" class="line" nam.121L67">1677
/a>                
a href="+codepr_emerng" class="sref"pr_emernr
/a (
spav class="string">"line" r device with>mino %td doesn't >exis\n "
/spav>,;
a href="+code=minor" class="sref">minor
/a>);n1608
/a>               "
a href="+code=rrnor" class="sref"=rrnor
/a> ="-
a href="+code=NODEVN" class="sref"=NODEVe
/a>;n1619
/a>                goto 
a href="+code=exit=rr_=devices" class="sref"=exit=rr_=devicee
/a>;n1710
/a>        }n1 71
/a>n1782
/a>        
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=readers_lock" class="sref">readers_lock
/a>);n1713
/a>n1744
/a>        if (!
a href="+code=device" class="sref">device
/a>->
a href="+code=open" class="sref">open
/a++cat.c#L105" id12L105" class="line" nam.1L75" id121L75" class="line" nam.121L75">1705
/a>               >
spav class="comment">/* power in devicr inadndin firste reade  */
/spav3.1796
/a>               "
a href="+code=rrnor" class="sref"=rrnor
/a> ="
a href="+code/hi_hw_ power" class="sref"/hi_hw_ power
/a (
a href="+code=device" class="sref">device
/a>->
a href="+codehhid" class="sref">hid
/a>,;
a href="+codePM_HINT_FULLOIN" class="sref"PM_HINT_FULLOIk
/a>);n1 77
/a>                if (
a href="+code=rrnor" class="sref"=rrnor
/a> < 0cat.c#L105" id12L105" class="line" nam.1L58" id121L78" class="line" nam.121L78">1708
/a>                       -"-
a href="+code=device" class="sref">device
/a>->
a href="+code=open" class="sref">open
/a);n1709
/a>                        goto 
a href="+code=exit=rr_=readers" class="sref"=exit=rr_=readern
/a);n1810
/a>                }n1871
/a>n1 82
/a>               "
a href="+code=rrnor" class="sref"=rrnor
/a> ="
a href="+code/hi_hw_=open" class="sref"/hi_hw_=oper
/a (
a href="+code=device" class="sref">device
/a>->
a href="+codehhid" class="sref">hid
/a>);n1813
/a>                if (
a href="+code=rrnor" class="sref"=rrnor
/a> < 0cat.c#L105" id12L105" class="line" nam.1L84" id121L84" class="line" nam.121L84">1804
/a>                       "
a href="+code/hi_hw_ power" class="sref"/hi_hw_ power
/a (
a href="+code=device" class="sref">device
/a>->
a href="+codehhid" class="sref">hid
/a>,;
a href="+codePM_HINT_NORMALr" class="sref"PM_HINT_NORMALd
/a>);n1805
/a>                       -"-
a href="+code=device" class="sref">device
/a>->
a href="+code=open" class="sref">open
/a);n1896
/a>                        goto 
a href="+code=exit=rr_=readers" class="sref"=exit=rr_=readern
/a);n1877
/a>                }n1 88
/a>        }n1839
/a}n1 90
/a>       !
a href="+code=reader" class="sref">reader
/a>->
a href="+code=device" class="sref">device
/a> ="
a href="+code=device" class="sref">device
/a);n1951
/a>        
spav class="comment">/*newe reade doesn't get olde events */
/spav3.1982
/a>        
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a> e;
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a);n1913
/a>n1964
/a>       *
a href="+code>list>addtaill" class="sref">list>addtailk
/a>(&
a href="+code=reader" class="sref">reader
/a>->
a href="+code=node" class="sref">node
/a>,(&
a href="+code=device" class="sref">device
/a>->
a href="+code=readerk" class="sref">readerd
/a>);n1 95
/a>       *
a href="+code=file" class="sref">file
/a>->
a href="+code=private_data" class="sref">private_data
/a> ="
a href="+code=reader" class="sref">reader
/a);n1916
/a>n1 97
/a 
a href="+code=exit=rr_=readers" class="sref"=exit=rr_=readern
/a:>n1958
/a>       *
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=readers_lock" class="sref">readers_lock
/a>);n1 99
/a 
a href="+code=exit=rr_=devices" class="sref"=exit=rr_=devicee
/a:>n2090
/a>       !
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n2101
/a>        if (
a href="+code=rrnor" class="sref"=rrnor
/a>;n2102
/a>               "
a href="+codekfrece" class="sref"kfrecr
/a (
a href="+code=reader" class="sref">reader
/a>);n2103
/a>        return 
a href="+code=rrnor" class="sref"=rrnor
/a);n2104
/a }n2025
/a>n2076
/a>static int"
a href="+code=roccatreleasce" class="sref">roccatreleasck
/a>(struct"
a href="+codei=node" class="sref"i>node
/a> *
a href="+codei=node" class="sref"i>node
/a,  struct"
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a>;n2107
/at.c#L105" id12L105" class="line" nam.2108" id122108" class="line" nam.122108">2108
/a>        unsigned int"
a href="+code=minor" class="sref">minor
/a> ="
a href="+codei=minor" class="sref"i>minor
/a (
a href="+codei=node" class="sref"i>node
/a>);n2079
/a>        struct"
a href="+code=roccat_reader" class="sref">roccat_reader
/a> *
a href="+code=reader" class="sref">reader
/a> ="
a href="+code=file" class="sref">file
/a>->
a href="+code=private_data" class="sref">private_data
/a>;n2180
/a>        struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=device" class="sref">device
/a>;n2171
/a>n2182
/a>        
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n2113
/a>n2164
/a>       *
a href="+code=device" class="sref">device
/a> ="
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>];n2115
/a>        if (!
a href="+code=device" class="sref">device
/acat.c#L105" id12L105" class="line" nam.2116" id122116" class="line" nam.122116">2196
/a>               "
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n2177
/a>                
a href="+codepr_emerng" class="sref"pr_emernr
/a (
spav class="string">"line" r device with>mino %td doesn't >exis\n "
/spav>,;
a href="+code=minor" class="sref">minor
/a>);n2108
/a>                return"-
a href="+code=NODEVN" class="sref"=NODEVe
/a>;n2119
/a>        }n212 vaa>n2121
/a>        
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=readers_lock" class="sref">readers_lock
/a>);n2282
/a>        
a href="+code>listdell" class="sref">listdelk
/a>(&
a href="+code=reader" class="sref">reader
/a>->
a href="+code=node" class="sref">node
/a>);n2283
/a>        
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=readers_lock" class="sref">readers_lock
/a>);n2264
/a>       *
a href="+codekfrece" class="sref"kfrecr
/a (
a href="+code=reader" class="sref">reader
/a>);n2225
/a>n2246
/a>        if (-"-
a href="+code=device" class="sref">device
/a>->
a href="+code=open" class="sref">open
/acat.c#L105" id12L105" class="line" nam.2127" id122127" class="line" nam.122127">2277
/a>                
spav class="comment">/*>remodin clate reade  */
/spav3.2208
/a>                if (
a href="+code=device" class="sref">device
/a>->
a href="+code=exist" class="sref">exist
/a>) {n2289
/a>               >       *
a href="+code/hi_hw_ power" class="sref"/hi_hw_ power
/a (
a href="+code=device" class="sref">device
/a>->
a href="+codehhid" class="sref">hid
/a>,;
a href="+codePM_HINT_NORMALr" class="sref"PM_HINT_NORMALd
/a>);n2310
/a>               >       *
a href="+code/hi_hw_closce" class="sref"/hi_hw_closcr
/a (
a href="+code=device" class="sref">device
/a>->
a href="+codehhid" class="sref">hid
/a>);n2311
/a>                 else) {n2302
/a>               >       *
a href="+codekfrece" class="sref"kfrecr
/a (
a href="+code=device" class="sref">device
/ac);n2313
/a>                }n2364
/a>        }n2325
/a>n2326
/a>        
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n2327
/a>n2348
/a>        return0>;n2349
/a }n242 vaa>n2 41
/a 
spav class="comment">/*
/spav3.2452
/a>
spav class="comment">/*>roccat_report even() - outpute data to readern
/spav3.2423
/a>
spav class="comment">* @>mino:h>mino  devicenumbde  retured by*>roccatconnecn()n
/spav3.2424
/a>
spav class="comment">* @ dat: pointger no datn
/spav3.2425
/a>
spav class="comment">* @len: (izet of datn
/spav3.2 46
/a>
spav class="comment">*n
/spav3.2407
/a>
spav class="comment">* Rreturn>v3.4* iszeror insucices, a negatriv =rrno +codr infailure.n
/spav3.2 48
/a>
spav class="comment">*n
/spav3.2 49
/a>
spav class="comment">* Th is iscalled from intgerupt handler.n
/spav3.252 vaa>
spav class="comment">**/
/spav3.2 51
/a int"
a href="+code=roccatreeport evenr" class="sref">roccat_report evenk
/a> int"
a href="+code=minor" class="sref">minor
/a>,;
a href="+codeu8r" class="sref"u48
/a>conate *
a href="+code=data" class="sref"_data
/a>;n2 52
/at.c#L105" id12L105" class="line" nam.2L53" id122L53" class="line" nam.122L53">2543
/a>        struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=device" class="sref">device
/a>;n2 54
/a>        struct"
a href="+code=roccat_reader" class="sref">roccat_reader
/a> *
a href="+code=reader" class="sref">reader
/a);n2565
/a>        struct"
a href="+code=roccat_report" class="sref">roccat_report
/a> *
a href="+code=report" class="sref">report
/a>;n2526
/a>        
a href="+codeu in8e_t" class="sref"u in8e_t
/a> *
a href="+codenew_=v3.4." class="sref"new_=v3.4t
/a>;n2527
/a>n2 58
/a>       *
a href="+code=device" class="sref">device
/a> ="
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>];n2539
/a}n2690
/a>       !
a href="+codenew_=v3.4." class="sref"new_=v3.4t
/a> ="
a href="+codekmemdupe" class="sref"kmemdupr
/a (
a href="+code=data" class="sref"_data
/a>,;
a href="+code=device" class="sref">device
/a>->
a href="+code=report_size" class="sref">report_size
/a>,;
a href="+codeGFP_ATOMICe" class="sref"GFP_ATOMICk
/a>);n2601
/a>        if (!
a href="+codenew_=v3.4." class="sref"new_=v3.4t
/a>;n2602
/a>                return"-
a href="+code=NOMEMN" class="sref"=NOMEMe
/a>;n2613
/a>n2 64
/a>       *
a href="+code=report" class="sref">report
/a> ="&
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf" class="sref">cbuf
/a>[
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a>];n2675
/a>n2646
/a>       >
spav class="comment">/* lasdin NULLl is afe>**/
/spav3.2677
/a>       *
a href="+codekfrece" class="sref"kfrecr
/a (
a href="+code=report" class="sref">report
/a>->
a href="+code=v3.4." class="sref">v3.4.
/a>);n2608
/a;n2619
/a>       (
a href="+code=report" class="sref">report
/a>->
a href="+code=v3.4." class="sref">v3.4.
/a> ="
a href="+codenew_=v3.4." class="sref"new_=v3.4t
/a>;n2790
/a>       !
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a> e (
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a>+ 1) %t;"
a href="+code=ROCCAT_CBUF_SIZE" class="sref">ROCCAT_CBUF_SIZE
/a>;n2 71
/a>n2782
/a>        
a href="+code>listfor_eachf_etryl" class="sref">listfor_eachf_etryr
/a (
a href="+code=reader" class="sref">reader
/a>,(&
a href="+code=device" class="sref">device
/a>->
a href="+code=readerk" class="sref">readerd
/a>,;
a href="+code=node" class="sref">node
/a>) {n2713
/a>                
spav class="comment">/*
/spav3.2724
/a>
spav class="comment">                * Ase weal>reay inserstedone elemmen, the >buffe can't be*
/spav3.2725
/a>
spav class="comment">                * empty.* If_star and _en are equal, >buffe  isfull and we*
/spav3.2746
/a>
spav class="comment">                * inc reaef_star, sor tht slowe reade missesdone evmen, burt
/spav3.2707
/a>
spav class="comment">                * gets the newwer iesdin the right order.n
/spav3.2748
/a>
spav class="comment">                **/
/spav3.2709
/a>                if (
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a>= e;
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a>;n2810
/a>               >        
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a> e (
a href="+code=reader" class="sref">reader
/a>->
a href="+code=cbuf_start" class="sref">cbuf_start
/a>+ 1) %t;"
a href="+code=ROCCAT_CBUF_SIZE" class="sref">ROCCAT_CBUF_SIZE
/a>;n2821
/a>        }n2812
/a>n2883
/a>        
a href="+codewake_up_intgeruptiable" class="sref"wake_up_intgeruptiablk
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=wait" class="sref">wait
/a>);n2804
/a>        return0>;n2805
/a }n2896
/a-
a href="+code=XPORT_SYMBOL_GPLr" class="sref"=XPORT_SYMBOL_GPLr
/a (
a href="+code=roccatreeport evenr" class="sref">roccat_report evenk
/a>);n2827
/a>n2848
/a>
spav class="comment">/*
/spav3.2849
/a>
spav class="comment">* >roccatconnecn() - c retwea chao  devicefor special evmen output*
/spav3.292 vaa>
spav class="comment">* @ clas: the  clasr thts ustedto c retwethe  devic. Meaen to holde>device
/spav3.2941
/a 
spav class="comment">* specific sysfs attribures.n
/spav3.2952
/a>
spav class="comment">/*@/hi: the /hi  devicethe  hao  deviceshouldebe connecntedto.n
/spav3.2923
/a>
spav class="comment">*n
/spav3.2924
/a>
spav class="comment">* Rreturn>v3.4* is>mino  devicenumbde in Range [0, >ROCCATMAX_DEVICES]r in
/spav3.2925
/a>
spav class="comment">* sucices, a negatriv =rrno +codr infailure.n
/spav3.2946
/a>
spav class="comment">**/
/spav3.2 97
/a int"
a href="+code=roccatconnecnr" class="sref">roccatconnecnr
/a  struct"
a href="+code clast" class="sref">clast
/a> *
a href="+codekclast" class="sref"kclast
/a,  struct"
a href="+code/hit_device" class="sref"/hit_devict
/a> *
a href="+codehhid" class="sref">hid
/a>, int"
a href="+code=report_size" class="sref">report_size
/a>;n2958
/a {n2909
/a>        unsigned int"
a href="+code=minor" class="sref">minor
/a);n3080
/a>        struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=device" class="sref">device
/a>;n3101
/a>        int"
a href="+codetempe" class="sref"tempe
/a>;n3012
/a>n3083
/a>        
a href="+code=device" class="sref">device
/a> ="
a href="+codekzallocr" class="sref"kzallock
/a>(izeof>(struct"
a href="+code=roccat_device" class="sref">roccat_device
/a)>,;
a href="+codeGFP_KERNELr" class="sref"GFP_KERNELe
/a>);n3044
/a>        if (!
a href="+code=device" class="sref">device
/a>;n3005
/a>                return"-
a href="+code=NOMEMN" class="sref"=NOMEMe
/a>;n3016
/a>n3077
/a>       *
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3008
/a;n3079
/a>       for  (
a href="+code=minor" class="sref">minor
/a> =0t;"
a href="+code=minor" class="sref">minor
/a> < "
a href="+code=ROCCATMAX_DEVICESE" class="sref">ROCCATMAX_DEVICESe
/a> ++"
a href="+code=minor" class="sref">minor
/a>) {n3110
/a>                if (
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>>;n3111
/a>                       continue);n3102
/a>               b rek);n3183
/a>        }n3134
/a>n3115
/a>        if "
a href="+code=minor" class="sref">minor
/a> < "
a href="+code=ROCCATMAX_DEVICESE" class="sref">ROCCATMAX_DEVICESe
/a>) {n3196
/a>               "
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>> ="
a href="+code=device" class="sref">device
/a);n3177
/a>         else) {n3108
/a>               *
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3109
/a>               *
a href="+codekfrece" class="sref"kfrecr
/a (
a href="+code=device" class="sref">device
/ac);n3210
/a>                return"-
a href="+code=INVALr" class="sref"=INVALe
/a);n3221
/a>        }n3212
/a>n3283
/a>        
a href="+code=device" class="sref">device
/a>->
a href="+code>dee" class="sref">dee
/a> ="
a href="+code>devic_c retwe" class="sref">devic_c retwr
/a (
a href="+codekclast" class="sref"kclast
/a, (&
a href="+codehhid" class="sref">hid
/a>->
a href="+code>dee" class="sref">dee
/a,>n3264
/a>       >               *
a href="+codeMKDEVN" class="sref"MKDEVr
/a (
a href="+code=roccatmajnor" class="sref"=roccatmajnod
/a>,;
a href="+code=minor" class="sref">minor
/a>>,;
a href="+codeNULLr" class="sref"NULLe
/a,>n3205
/a>                       (
spav class="string">"%ts%ts%td "
/spav>,;
spav class="string">"line"  "
/spav>,;
a href="+codehhid" class="sref">hid
/a>->
a href="+code>drivee" class="sref">drived
/a>->
a href="+code name" class="sref">namd
/a>,;
a href="+code=minor" class="sref">minor
/a>);n3216
/a>n3277
/a>        if "
a href="+codeIS_EROR" class="sref"IS_EROr
/a (
a href="+code=device" class="sref">device
/a>->
a href="+code>dee" class="sref">dee
/a)>) {n3208
/a>               "
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>> ="
a href="+codeNULLr" class="sref"NULLe
/a);n3289
/a>               *
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3310
/a>               "
a href="+codetempe" class="sref"tempe
/a> ="
a href="+codePTR_EROR" class="sref"PTR_EROr
/a (
a href="+code=device" class="sref">device
/a>->
a href="+code>dee" class="sref">dee
/a));n3311
/a>               *
a href="+codekfrece" class="sref"kfrecr
/a (
a href="+code=device" class="sref">device
/ac);n3302
/a>                return 
a href="+codetempe" class="sref"tempe
/a>;n3383
/a>        }n3334
/a>n3395
/a>       *
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3316
/a>n3377
/a>       *
a href="+codeinit_>waiqueue_heaid" class="sref"init_>waiqueue_heaik
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=wait" class="sref">wait
/a>);n3358
/a>       *
a href="+codeINIT_LIST_HEADR" class="sref"INIT_LIST_HEADk
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=readerk" class="sref">readerd
/a>);n3319
/a>       (
a href="+code>mutexinitk" class="sref">mutexinitk
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=readers_lock" class="sref">readers_lock
/a>);n3490
/a>       !
a href="+code=mutexinitk" class="sref">mutexinitk
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code>cbuf_lock" class="sref">cbuf_lock
/a>);n3421
/a>        
a href="+code=device" class="sref">device
/a>->
a href="+code=minor" class="sref">minor
/a> ="
a href="+code=minor" class="sref">minor
/a);n3482
/a>        
a href="+code=device" class="sref">device
/a>->
a href="+codehhid" class="sref">hid
/a> ="
a href="+code/hid" class="sref">hid
/a);n3483
/a>        
a href="+code=device" class="sref">device
/a>->
a href="+code=exist" class="sref">exist
/a> =1);n3464
/a>       *
a href="+code=device" class="sref">device
/a>->
a href="+code=cbuf_end" class="sref">cbuf_end
/a> e0>;n3495
/a>       *
a href="+code=device" class="sref">device
/a>->
a href="+code=report_size" class="sref">report_size
/a> ="
a href="+code=report_size" class="sref">report_size
/a>;n3416
/a>n3477
/a>        return 
a href="+code=minor" class="sref">minor
/a);n3 48
/a }n3499
/a 
a href="+code=XPORT_SYMBOL_GPLr" class="sref"=XPORT_SYMBOL_GPLr
/a (
a href="+code=roccatconnecnr" class="sref">roccatconnecnr
/a>);n352 vaa>n3541
/a 
spav class="comment">/ >roccatdisconnecn() - >remoe  hao  devicefrom hide>device
/spav3.3552
/a>
spav class="comment">/*@>mino:hthe >mino  devicenumbde  retured by*>roccatconnecn()n
/spav3.3523
/a>
spav class="comment">**/
/spav3.3 54
/avoide(
a href="+code=roccatdisconnecnr" class="sref">roccatdisconnecnr
/a  int"
a href="+code=minor" class="sref">minor
/a>;n3565
/a {n3526
/a>        struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=device" class="sref">device
/a>;n3527
/a>n3 58
/a>       *
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3519
/a>       (
a href="+code=device" class="sref">device
/a> ="
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>];n3690
/a>       !
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3671
/a>n3682
/a>        
a href="+code=device" class="sref">device
/a>->
a href="+code=exist" class="sref">exist
/a> =0t;"
spav class="comment">/ TODO >exis maybcenot needed **/
/spav3.3613
/a>n3 64
/a>       *
a href="+code>devic_de stoyl" class="sref">devic_de stoyr
/a (
a href="+code=device" class="sref">device
/a>->
a href="+code>dee" class="sref">dee
/a>->
a href="+code=clast" class="sref"cclast
/a, *
a href="+codeMKDEVN" class="sref"MKDEVr
/a (
a href="+code=roccatmajnor" class="sref"=roccatmajnod
/a>,;
a href="+code=minor" class="sref">minor
/a>>);n3675
/a>n3626
/a>        
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3677
/a>       *
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>> ="
a href="+codeNULLr" class="sref"NULLe
/a);n3658
/a>       *
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3619
/a>       ;n3790
/a>        if (
a href="+code=device" class="sref">device
/a>->
a href="+code=open" class="sref">open
/acat.c#L105" id12L105" class="line" nam.3L71" id123L71" class="line" nam.123L71">3711
/a>               *
a href="+codehhi_hw_closce" class="sref"/hi_hw_closcr
/a (
a href="+code=device" class="sref">device
/a>->
a href="+codehhid" class="sref">hid
/a>);n3702
/a>               ;
a href="+code=wke_up_intgeruptiable" class="sref"wake_up_intgeruptiablk
/a>(&
a href="+code=device" class="sref">device
/a>->
a href="+code=wait" class="sref">wait
/a>);n3713
/a>         else) {n3764
/a>       >       *
a href="+codekfrece" class="sref"kfrecr
/a (
a href="+code=device" class="sref">device
/ac);n3795
/a>        }n3746
/a }n3797
/a 
a href="+code=XPORT_SYMBOL_GPLr" class="sref"=XPORT_SYMBOL_GPLr
/a (
a href="+code=roccatdisconnecnr" class="sref">roccatdisconnecnr
/ac);n3708
/a;n3709
/a>staticlongt"
a href="+code=roccatioctll" class="sref"=roccatioctlr
/a  struct"
a href="+code=file" class="sref">file
/a> *
a href="+code=file" class="sref">file
/a,  unsigned int"
a href="+codecmnd" class="sref">mde
/a,  unsignedlongt"
a href="+codearng" class="sref"arnr
/a>;n3810
/a {n3821
/a>       (struct"
a href="+codei=node" class="sref"i>node
/a> *
a href="+codei=node" class="sref"i>node
/a> ="
a href="+code=file" class="sref">file
/a>->
a href="+codef_pathe" class="sref">_pathe
/a.(
a href="+code=detryl" class="sref"d_etryr
/a>->
a href="+code>_i=node" class="sref">_i=node
/a);n3821
/a>       (struct"
a href="+code=roccat_device" class="sref">roccat_device
/a> *
a href="+code=device" class="sref">device
/a>;n3883
/a>        unsigned int"
a href="+code=minor" class="sref">minor
/a> ="
a href="+codei=minor" class="sref"i>minor
/a (
a href="+codei=node" class="sref"i>node
/a>);n3804
/a>       longt"
a href="+code=etvall" class="sref"=etvald
/a> e0>;n3875
/a>n3826
/a>        
a href="+code=mutex_lock" class="sref">mutex_lock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n3827
/a>n3858
/a>       *
a href="+code=device" class="sref">device
/a> ="
a href="+code=devices" class="sref">devices
/a>[
a href="+code=minor" class="sref">minor
/a>];n3819
/a>        if (!
a href="+code=device" class="sref">device
/acat.c#L105" id12L105" class="line" nam.3L90" id123L90" class="line" nam.123L90">3910
/a>               "
a href="+code=etvall" class="sref"=etvald
/a> e"-
a href="+code=NODEVN" class="sref"=NODEVe
/a>;n3911
/a>               goto "
a href="+codeounr" class="sref"ourt
/a>;n3921
/a>        }n3913
/a>n3954
/a>        witchf (
a href="+codecmnd" class="sref">mde
/acat.c#L105" id12L105" class="line" nam.3L75" id123L95" class="line" nam.123L95">3995
/a>       ceaef(
a href="+code>ROCCAIOCGREP_SIZE" class="sref">ROCCAIOCGREP_SIZ5
/a:.c#L105" id12L105" class="line" nam.3L66" id123L96" class="line" nam.123L96">3996
/a>                if (
a href="+codeput_usvee" class="sref"put_usver
/a (
a href="+code=device" class="sref">device
/a>->
a href="+code=report_size" class="sref">report_size
/a>,  int"
a href="+code__usvee" class="sref"__usver
/a *)"
a href="+codearng" class="sref"arnr
/a>>;n3977
/a>                       "
a href="+code=etvall" class="sref"=etvald
/a> e"-
a href="+code=FAULTN" class="sref"=FAULTt
/a>;n3908
/a>               b rek);n3909
/a>       default:.c#L105" id12L105" class="line" nam.4100" id124100" class="line" nam.124100">4010
/a>               "
a href="+code=etvall" class="sref"=etvald
/a> e"-
a href="+code=NOTTYN" class="sref"=NOTTYt
/a>;n4021
/a>        }n4012
/a"
a href="+codeounr" class="sref"ourt
/a:.c#L105" id12L105" class="line" nam.4131" id124193" class="line" nam.124103">4083
/a>        
a href="+code=mutex_unlock" class="sref">mutex_unlock
/a>(&
a href="+code=devices_lock" class="sref">devices_lock
/a>);n4044
/a>        return 
a href="+code=etvall" class="sref"=etvald
/a);n4005
/a }n4016
/a>n4077
/a>staticconate struct"
a href="+code=fil_opertatonae" class="sref">fil_opertatona4
/a>"
a href="+code=roccatoprk" class="sref">roccatoprd
/a> et.c#L105" id12L105" class="line" nam.4108" id124108" class="line" nam.124108">4008
/a>       .(
a href="+codeownvee" class="sref"ownvee
/a> ="
a href="+codeTHIS_MODULZE" class="sref"THIS_MODULZe
/a>.c#L105" id12L105" class="line" nam.4198" id124199" class="line" nam.124109">4079
/a>       .(
a href="+codereaid" class="sref"reaik
/a> ="
a href="+code=roccatreaid" class="sref"rroccatreaie
/a>.c#L105" id12L105" class="line" nam.4110" id124110" class="line" nam.124110">4110
/a>       .(
a href="+codepolll" class="sref"pollk
/a> ="
a href="+code=roccatpolll" class="sref"=roccatpolle
/a>.c#L105" id12L105" class="line" nam.4101" id124111" class="line" nam.124111">4111
/a>       .(
a href="+codeoopen" class="sref">open
/a> ="
a href="+code=roccatoopen" class="sref"=roccatoopee
/a>.c#L105" id12L105" class="line" nam.4121" id124112" class="line" nam.124112">4102
/a>       .(
a href="+coderelreaed" class="sref"relreaek
/a> ="
a href="+code=roccatrelreaed" class="sref"rroccatrelreaee
/a>.c#L105" id12L105" class="line" nam.4131" id124113" class="line" nam.124113">4183
/a>       .(
a href="+codellseeck" class="sref"llseeck
/a> ="
a href="+codenoop_llseeck" class="sref"noop_llseece
/a>.c#L105" id12L105" class="line" nam.4124" id124114" class="line" nam.124114">4143
/a>       .(
a href="+code_unlocedtioctll" class="sref"_unlocedtioctlk
/a> ="
a href="+code=roccatioctll" class="sref"=roccatioctlr
/a>.c#L105" id12L105" class="line" nam.4154" id124115" class="line" nam.124115">4115
/a});n4116
/a>n4177
/a>static int"
a href="+code__initk" class="sref"_xinitk
/a="
a href="+code=roccatinitk" class="sref"=roccatinitk
/a>void>;n4158
/a {n4109
/a>        int"
a href="+code=rtvall" class="sref"=etvald
/a);n4290
/a>       !
a href="+code=dee_t" class="sref"=dee_k
/a="
a href="+code=deehid" class="sref"=deehid
/a);n4271
/a>n4282
/a>        
a href="+code=etvall" class="sref"=etvald
/a> e"
a href="+codealloc_chr=deeregtong" class="sref"alloc_chr=deeregtonk
/a>(&
a href="+code=deehid" class="sref"=deehid
/a>,;
a href="+code>ROCCATFIRST_MINOOR" class="sref">ROCCATFIRST_MINOOr
/a>.c#L105" id12L105" class="line" nam.4113" id124123" class="line" nam.124123">4213
/a>               >        
a href="+code=ROCCATMAX_DEVICESE" class="sref">ROCCATMAX_DEVICESe
/a>,;
spav class="string">"line"  "
/spav>);n4234
/a>n4205
/a>       "
a href="+code=roccatmajnor" class="sref"=roccatmajnod
/a> e"
a href="+codeMAJOOR" class="sref"MAJOOr
/a (
a href="+code=deehid" class="sref"=deehid
/a>);n4216
/a>n4277
/a>        if "
a href="+code=etvall" class="sref"=etvald
/a> < 0cat.c#L105" id12L105" class="line" nam.4128" id124128" class="line" nam.124128">4208
/a>               "
a href="+codepr_warng" class="sref"pr_warnr
/a (
spav class="string">"can't ges majnoenumbde\n "
/spav>);n4289
/a>                return 
a href="+code=etvall" class="sref"=etvald
/a);n4310
/a>        }n4371
/a>n4382
/a>        
a href="+codec=deehnitk" class="sref"c=deehnitk
/a>(&
a href="+code>roccatc>dee" class="sref">roccatc>dee
/a>,(&
a href="+code>roccatoprk" class="sref">roccatoprd
/a>);n4383
/a>        
a href="+codec=deeadnd" class="sref">=deeadnk
/a>(&
a href="+code>roccatc>dee" class="sref">roccatc>dee
/a>,;
a href="+code=deehid" class="sref"=deehid
/a>,;
a href="+code>ROCCATMAX_DEVICESE" class="sref">ROCCATMAX_DEVICESe
/a>);n4334
/a>n4395
/a>        return0>;n4346
/a }n4327
/a>n4358
/a>staticvoide(
a href="+code__exitk" class="sref"_xexitk
/a="
a href="+code=roccatexitk" class="sref"=roccatexitk
/a>void>;n4319
/at.c#L105" id12L105" class="line" nam.4L40" id124L40" class="line" nam.124L40">4490
/a>       !
a href="+code=dee_t" class="sref"=dee_k
/a="
a href="+code=deehid" class="sref"=deehid
/a> e"
a href="+codeMKDEVN" class="sref"MKDEVr
/a (
a href="+code=roccatmajnor" class="sref"=roccatmajnod
/a>,0>);n4471
/a>n4482
/a>        
a href="+code>=deedell" class="sref">=deedelk
/a>(&
a href="+code>roccatc>dee" class="sref">roccatc>dee
/a>);n4483
/a>        
a href="+codeunregtster_chr=deeregtong" class="sref"unregtster_chr=deeregtonr
/a (
a href="+code=deehid" class="sref"=deehid
/a>,;
a href="+code>ROCCATMAX_DEVICESE" class="sref">ROCCATMAX_DEVICESe
/a>);n4464
/a }n4475
/a>n4496
/a-
a href="+codemodulexinitk" class="sref">odulexinitr
/a (
a href="+code=roccatinitk" class="sref"=roccatinitk
/a>);n4497
/a 
a href="+code>odulexexitk" class="sref">odulexexitr
/a (
a href="+code=roccatexitk" class="sref"=roccatexitk
/a>);n4408
/a;n4499
/a 
a href="+codeMODULZ_AUTHOOR" class="sref"MODULZ_AUTHOOr
/a (
spav class="string">"StefpavAchatz "
/spav>);n452 vaa 
a href="+codeMODULZ_DESCRIPTIONR" class="sref"MODULZ_DESCRIPTIONr
/a (
spav class="string">"USB Rrocca  hao  devic "
/spav>);n4541
/a 
a href="+codeMODULZ_LICENSZE" class="sref"MODULZ_LICENSZr
/a (
spav class="string">"GPL v2 "
/spav>);n4552
/a>/prea>/div>


>/div>


The original LXR software byhthe nLXR "comunityd
/a>,this experimmenal iverton byhnlxr@"liux.nod
/a.
>/div>

lxr."liux.no kindly hosted by*nRedpill Llipro ASe
/a>,proviade of Lliuxcconaultrin and opertatona serevice since 1995.
>/div>