Changes in uspace/drv/bus/isa/isa.c [ebc9c2c:9e470c0] in mainline
- File:
-
- 1 edited
-
uspace/drv/bus/isa/isa.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
rebc9c2c r9e470c0 54 54 #include <ipc/irc.h> 55 55 #include <ipc/services.h> 56 #include <sysinfo.h> 57 #include <ns.h> 56 58 #include <sys/stat.h> 57 #include <irc.h> 59 #include <ipc/irc.h> 60 #include <ipc/services.h> 61 #include <sysinfo.h> 58 62 #include <ns.h> 59 63 … … 116 120 assert(fun); 117 121 122 sysarg_t apic; 123 sysarg_t i8259; 124 125 async_sess_t *irc_sess = NULL; 126 127 if (((sysinfo_get_value("apic", &apic) == EOK) && (apic)) 128 || ((sysinfo_get_value("i8259", &i8259) == EOK) && (i8259))) { 129 irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 130 SERVICE_IRC, 0, 0); 131 } 132 133 if (!irc_sess) 134 return false; 135 118 136 const hw_resource_list_t *res = &fun->hw_resources; 119 137 assert(res); 120 138 for (size_t i = 0; i < res->count; ++i) { 121 139 if (res->resources[i].type == INTERRUPT) { 122 int rc = irc_enable_interrupt( 123 res->resources[i].res.interrupt.irq); 124 125 if (rc != EOK) 140 const int irq = res->resources[i].res.interrupt.irq; 141 142 async_exch_t *exch = async_exchange_begin(irc_sess); 143 const int rc = 144 async_req_1_0(exch, IRC_ENABLE_INTERRUPT, irq); 145 async_exchange_end(exch); 146 147 if (rc != EOK) { 148 async_hangup(irc_sess); 126 149 return false; 127 } 128 } 129 150 } 151 } 152 } 153 154 async_hangup(irc_sess); 130 155 return true; 131 156 } … … 330 355 331 356 /* Get the name part of the rest of the line. */ 332 str _tok(line, ":", NULL);357 strtok(line, ":"); 333 358 return line; 334 359 }
Note:
See TracChangeset
for help on using the changeset viewer.
