Changes in uspace/drv/char/i8042/i8042.c [75751db6:cccd60c3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/i8042/i8042.c
r75751db6 rcccd60c3 269 269 }; 270 270 271 rc = register_interrupt_handler(ddf_dev, irq_kbd, i8042_irq_handler, 272 &irq_code); 273 if (rc != EOK) { 271 const int irq_kbd_cap = register_interrupt_handler(ddf_dev, irq_kbd, 272 i8042_irq_handler, &irq_code); 273 if (irq_kbd_cap < 0) { 274 rc = irq_kbd_cap; 274 275 ddf_msg(LVL_ERROR, "Failed set handler for kbd: %s.", 275 276 ddf_dev_get_name(ddf_dev)); … … 277 278 } 278 279 279 rc = register_interrupt_handler(ddf_dev, irq_mouse, i8042_irq_handler, 280 &irq_code); 281 if (rc != EOK) { 280 const int irq_mouse_cap = register_interrupt_handler(ddf_dev, irq_mouse, 281 i8042_irq_handler, &irq_code); 282 if (irq_mouse_cap < 0) { 283 rc = irq_mouse_cap; 282 284 ddf_msg(LVL_ERROR, "Failed set handler for mouse: %s.", 283 285 ddf_dev_get_name(ddf_dev)); … … 289 291 assert(parent_sess != NULL); 290 292 291 const bool enabled = hw_res_enable_interrupt(parent_sess); 292 if (!enabled) { 293 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to enable interrupts: %s.", 293 rc = hw_res_enable_interrupt(parent_sess, irq_kbd); 294 if (rc != EOK) { 295 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to enable keyboard interrupt: %s.", 296 ddf_dev_get_name(ddf_dev)); 297 rc = EIO; 298 goto error; 299 } 300 301 rc = hw_res_enable_interrupt(parent_sess, irq_mouse); 302 if (rc != EOK) { 303 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to enable mouse interrupt: %s.", 294 304 ddf_dev_get_name(ddf_dev)); 295 305 rc = EIO;
Note:
See TracChangeset
for help on using the changeset viewer.