Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/scc/scc_core.c
| Show First 20 Lines • Show All 489 Lines • ▼ Show 20 Lines | case SCC_IVAR_HWMTX: | ||||
| break; | break; | ||||
| default: | default: | ||||
| return (EINVAL); | return (EINVAL); | ||||
| } | } | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| int | int | ||||
| scc_bus_release_resource(device_t dev, device_t child, int type, int rid, | scc_bus_release_resource(device_t dev, device_t child, struct resource *res) | ||||
| struct resource *res) | |||||
| { | { | ||||
| struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
| struct scc_chan *ch; | struct scc_chan *ch; | ||||
| struct scc_mode *m; | struct scc_mode *m; | ||||
| if (device_get_parent(child) != dev) | if (device_get_parent(child) != dev) | ||||
| return (EINVAL); | return (EINVAL); | ||||
| m = device_get_ivars(child); | m = device_get_ivars(child); | ||||
| ch = m->m_chan; | ch = m->m_chan; | ||||
| rle = resource_list_find(&ch->ch_rlist, type, rid); | rle = resource_list_find(&ch->ch_rlist, rman_get_type(res), | ||||
| rman_get_rid(res)); | |||||
| return ((rle == NULL) ? EINVAL : 0); | return ((rle == NULL) ? EINVAL : 0); | ||||
| } | } | ||||
| int | int | ||||
| scc_bus_setup_intr(device_t dev, device_t child, struct resource *r, int flags, | scc_bus_setup_intr(device_t dev, device_t child, struct resource *r, int flags, | ||||
| driver_filter_t *filt, void (*ihand)(void *), void *arg, void **cookiep) | driver_filter_t *filt, void (*ihand)(void *), void *arg, void **cookiep) | ||||
| { | { | ||||
| struct scc_chan *ch; | struct scc_chan *ch; | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||