Changeset e747303 in mainline
- Timestamp:
- 2011-12-25T22:43:12Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5b0de4c
- Parents:
- a8f7029
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/i8042/i8042.c
ra8f7029 re747303 150 150 controller->aux_buffer_end : controller->kbd_buffer_end; 151 151 if (*buffer != NULL && *buffer < buffer_end) { 152 *(*buffer) ++= data;153 if ( *buffer== buffer_end)152 *(*buffer) = data; 153 if (++(*buffer) == buffer_end) 154 154 fibril_condvar_signal(&controller->data_avail); 155 155 } else { 156 ddf_msg(LVL_WARN, "Unhandled %s data: % x , status: %x.",156 ddf_msg(LVL_WARN, "Unhandled %s data: %hhx , status: %hhx.", 157 157 (status & i8042_AUX_DATA) ? "AUX" : "KBD", data, status); 158 158 } … … 173 173 return -1; 174 174 175 dev->kbd_fun = ddf_fun_create(ddf_dev, fun_ exposed, "ps2a");175 dev->kbd_fun = ddf_fun_create(ddf_dev, fun_inner, "ps2a"); 176 176 if (!dev->kbd_fun) 177 177 return ENOMEM; 178 int ret = ddf_fun_add_match_id(dev->kbd_fun, "xtkbd", 90); 179 if (ret != EOK) { 180 ddf_fun_destroy(dev->kbd_fun); 181 return ret; 182 } 178 183 179 184 dev->mouse_fun = ddf_fun_create(ddf_dev, fun_exposed, "ps2b"); … … 208 213 } else (void)0 209 214 210 intret = ddf_fun_bind(dev->kbd_fun);215 ret = ddf_fun_bind(dev->kbd_fun); 211 216 CHECK_RET_DESTROY(ret, 212 217 "Failed to bind keyboard function: %s.\n", str_error(ret)); … … 291 296 } 292 297 fibril_mutex_unlock(&controller->guard); 293 return EOK;298 return size; 294 299 } 295 300 /*----------------------------------------------------------------------------*/ … … 317 322 controller->kbd_buffer_end = NULL; 318 323 fibril_mutex_unlock(&controller->guard); 319 return EOK;324 return size; 320 325 } 321 326 /*----------------------------------------------------------------------------*/ … … 332 337 } 333 338 fibril_mutex_unlock(&controller->guard); 334 return EOK;339 return size; 335 340 } 336 341 /*----------------------------------------------------------------------------*/ … … 358 363 controller->aux_buffer_end = NULL; 359 364 fibril_mutex_unlock(&controller->guard); 360 return EOK;365 return size; 361 366 } 362 367 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.