Changeset b7fd2a0 in mainline for uspace/drv/audio/sb16/main.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/main.c
r36f0738 rb7fd2a0 47 47 #define NAME "sb16" 48 48 49 static int sb_add_device(ddf_dev_t *device);50 static int sb_get_res(ddf_dev_t *device, addr_range_t **pp_sb_regs,49 static errno_t sb_add_device(ddf_dev_t *device); 50 static errno_t sb_get_res(ddf_dev_t *device, addr_range_t **pp_sb_regs, 51 51 addr_range_t **pp_mpu_regs, int *irq, int *dma8, int *dma16); 52 static int sb_enable_interrupt(ddf_dev_t *device, int irq);52 static errno_t sb_enable_interrupt(ddf_dev_t *device, int irq); 53 53 54 54 static driver_ops_t sb_driver_ops = { … … 87 87 * @return Error code. 88 88 */ 89 static int sb_add_device(ddf_dev_t *device)89 static errno_t sb_add_device(ddf_dev_t *device) 90 90 { 91 91 bool handler_regd = false; … … 96 96 97 97 sb16_t *soft_state = ddf_dev_data_alloc(device, sizeof(sb16_t)); 98 int rc = soft_state ? EOK : ENOMEM;98 errno_t rc = soft_state ? EOK : ENOMEM; 99 99 if (rc != EOK) { 100 100 ddf_log_error("Failed to allocate sb16 structure."); … … 173 173 } 174 174 175 static int sb_get_res(ddf_dev_t *device, addr_range_t **pp_sb_regs,175 static errno_t sb_get_res(ddf_dev_t *device, addr_range_t **pp_sb_regs, 176 176 addr_range_t **pp_mpu_regs, int *irq, int *dma8, int *dma16) 177 177 { … … 184 184 hw_res_list_parsed_t hw_res; 185 185 hw_res_list_parsed_init(&hw_res); 186 const int ret = hw_res_get_list_parsed(parent_sess, &hw_res, 0);186 const errno_t ret = hw_res_get_list_parsed(parent_sess, &hw_res, 0); 187 187 if (ret != EOK) { 188 188 return ret; … … 241 241 } 242 242 243 static int sb_enable_interrupt(ddf_dev_t *device, int irq)243 static errno_t sb_enable_interrupt(ddf_dev_t *device, int irq) 244 244 { 245 245 async_sess_t *parent_sess = ddf_dev_parent_sess_get(device);
Note:
See TracChangeset
for help on using the changeset viewer.