Changeset 9934f7d in mainline for uspace/srv/hid/input/ctl/kbdev.c
- Timestamp:
- 2011-06-13T19:53:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a07a454
- Parents:
- 43ac0cc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/ctl/kbdev.c
r43ac0cc r9934f7d 54 54 static void kbdev_ctl_set_ind(kbd_dev_t *, unsigned); 55 55 56 static void kbdev_callback_conn(ipc_callid_t, ipc_call_t * );56 static void kbdev_callback_conn(ipc_callid_t, ipc_call_t *, void *arg); 57 57 58 58 kbd_ctl_ops_t kbdev_ctl = { … … 73 73 int fd; 74 74 } kbdev_t; 75 76 /** XXX Need to pass data from async_connect_to_me() to connection handler */77 static kbdev_t *unprotected_kbdev;78 75 79 76 static kbdev_t *kbdev_new(kbd_dev_t *kdev) … … 140 137 } 141 138 142 /* 143 * XXX We need to pass kbdev to the connection handler. Since the 144 * framework does not support this, use a global variable. 145 * This needs to be fixed ASAP. 146 */ 147 unprotected_kbdev = kbdev; 148 149 rc = async_connect_to_me(exch, 0, 0, 0, kbdev_callback_conn); 139 rc = async_connect_to_me(exch, 0, 0, 0, kbdev_callback_conn, kbdev); 150 140 if (rc != EOK) { 151 141 printf(NAME ": Failed creating callback connection from '%s'.\n", … … 177 167 } 178 168 179 static void kbdev_callback_conn(ipc_callid_t iid, ipc_call_t *icall )169 static void kbdev_callback_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg) 180 170 { 181 171 kbdev_t *kbdev; … … 183 173 int type, key; 184 174 185 kbdev = unprotected_kbdev; 175 /* Kbdev device structure */ 176 kbdev = arg; 186 177 187 178 while (true) {
Note:
See TracChangeset
for help on using the changeset viewer.