Changeset 8565a42 in mainline for uspace/srv/hid/input/ctl/kbdev.c
- Timestamp:
- 2018-03-02T20:34:50Z (7 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/ctl/kbdev.c
r3061bc1 r8565a42 66 66 /** Link to generic keyboard device */ 67 67 kbd_dev_t *kbd_dev; 68 68 69 69 /** Session with kbdev device */ 70 70 async_sess_t *sess; … … 76 76 if (kbdev == NULL) 77 77 return NULL; 78 78 79 79 kbdev->kbd_dev = kdev; 80 80 … … 86 86 if (kbdev->sess != NULL) 87 87 async_hangup(kbdev->sess); 88 88 89 89 free(kbdev); 90 90 } … … 99 99 return ENOENT; 100 100 } 101 101 102 102 kbdev_t *kbdev = kbdev_new(kdev); 103 103 if (kbdev == NULL) { … … 107 107 return ENOMEM; 108 108 } 109 109 110 110 kbdev->sess = sess; 111 111 112 112 async_exch_t *exch = async_exchange_begin(sess); 113 113 if (exch == NULL) { … … 117 117 return ENOENT; 118 118 } 119 119 120 120 port_id_t port; 121 121 errno_t rc = async_create_callback_port(exch, INTERFACE_KBD_CB, 0, 0, 122 122 kbdev_callback_conn, kbdev, &port); 123 123 124 124 if (rc != EOK) { 125 125 printf("%s: Failed creating callback connection from '%s'.\n", … … 129 129 return rc; 130 130 } 131 131 132 132 async_exchange_end(exch); 133 133 134 134 kdev->ctl_private = (void *) kbdev; 135 135 return 0; … … 142 142 if (!exch) 143 143 return; 144 144 145 145 async_msg_1(exch, KBDEV_SET_IND, mods); 146 146 async_exchange_end(exch);
Note:
See TracChangeset
for help on using the changeset viewer.