Changes in uspace/drv/audio/hdaudio/hdaudio.c [b7fd2a0:01c3bb4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdaudio.c
rb7fd2a0 r01c3bb4 52 52 #define NAME "hdaudio" 53 53 54 static errno_t hda_dev_add(ddf_dev_t *dev);55 static errno_t hda_dev_remove(ddf_dev_t *dev);56 static errno_t hda_dev_gone(ddf_dev_t *dev);57 static errno_t hda_fun_online(ddf_fun_t *fun);58 static errno_t hda_fun_offline(ddf_fun_t *fun);54 static int hda_dev_add(ddf_dev_t *dev); 55 static int hda_dev_remove(ddf_dev_t *dev); 56 static int hda_dev_gone(ddf_dev_t *dev); 57 static int hda_fun_online(ddf_fun_t *fun); 58 static int hda_fun_offline(ddf_fun_t *fun); 59 59 60 60 static void hdaudio_interrupt(ipc_call_t *, ddf_dev_t *); … … 148 148 }; 149 149 150 static errno_t hda_dev_add(ddf_dev_t *dev)150 static int hda_dev_add(ddf_dev_t *dev) 151 151 { 152 152 ddf_fun_t *fun_pcm = NULL; … … 160 160 int i; 161 161 void *regs = NULL; 162 errno_t rc;162 int rc; 163 163 164 164 ddf_msg(LVL_NOTE, "hda_dev_add()"); … … 259 259 rc = hw_res_enable_interrupt(hda->parent_sess, res.irqs.irqs[0]); 260 260 if (rc != EOK) { 261 ddf_msg(LVL_ERROR, "Failed enabling interrupt. : %s", str_error(rc));262 goto error; 263 } 264 265 int irq_cap ;266 rc = register_interrupt_handler(dev, res.irqs.irqs[0],267 hdaudio_interrupt, &irq_code, &irq_cap);268 if (rc != EOK) {269 ddf_msg(LVL_ERROR, "Failed registering interrupt handler : %s",270 str_error_name(rc));261 ddf_msg(LVL_ERROR, "Failed enabling interrupt. (%d)", rc); 262 goto error; 263 } 264 265 int irq_cap = register_interrupt_handler(dev, res.irqs.irqs[0], 266 hdaudio_interrupt, &irq_code); 267 if (irq_cap < 0) { 268 rc = irq_cap; 269 ddf_msg(LVL_ERROR, "Failed registering interrupt handler. (%d)", 270 rc); 271 271 goto error; 272 272 } … … 314 314 hw_res_list_parsed_clean(&res); 315 315 316 ddf_msg(LVL_NOTE, "Failing hda_dev_add() -> % s", str_error_name(rc));316 ddf_msg(LVL_NOTE, "Failing hda_dev_add() -> %d", rc); 317 317 return rc; 318 318 } 319 319 320 static errno_t hda_dev_remove(ddf_dev_t *dev)320 static int hda_dev_remove(ddf_dev_t *dev) 321 321 { 322 322 hda_t *hda = (hda_t *)ddf_dev_data_get(dev); 323 errno_t rc;323 int rc; 324 324 325 325 ddf_msg(LVL_DEBUG, "hda_dev_remove(%p)", dev); … … 340 340 } 341 341 342 static errno_t hda_dev_gone(ddf_dev_t *dev)342 static int hda_dev_gone(ddf_dev_t *dev) 343 343 { 344 344 hda_t *hda = (hda_t *)ddf_dev_data_get(dev); 345 errno_t rc;345 int rc; 346 346 347 347 ddf_msg(LVL_DEBUG, "hda_dev_remove(%p)", dev); … … 356 356 } 357 357 358 static errno_t hda_fun_online(ddf_fun_t *fun)358 static int hda_fun_online(ddf_fun_t *fun) 359 359 { 360 360 ddf_msg(LVL_DEBUG, "hda_fun_online()"); … … 362 362 } 363 363 364 static errno_t hda_fun_offline(ddf_fun_t *fun)364 static int hda_fun_offline(ddf_fun_t *fun) 365 365 { 366 366 ddf_msg(LVL_DEBUG, "hda_fun_offline()");
Note:
See TracChangeset
for help on using the changeset viewer.