uss820dci_atmelarm.c (192444) | uss820dci_atmelarm.c (194228) |
---|---|
1#include <sys/cdefs.h> | 1#include <sys/cdefs.h> |
2__FBSDID("$FreeBSD: head/sys/dev/usb/controller/uss820dci_atmelarm.c 192444 2009-05-20 16:58:53Z thompsa $"); | 2__FBSDID("$FreeBSD: head/sys/dev/usb/controller/uss820dci_atmelarm.c 194228 2009-06-15 01:02:43Z thompsa $"); |
3 4/*- 5 * Copyright (c) 2008 Hans Petter Selasky <hselasky@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 121 unchanged lines hidden (view full) --- 132 int rid; 133 134 /* initialise some bus fields */ 135 sc->sc_bus.parent = dev; 136 sc->sc_bus.devices = sc->sc_devices; 137 sc->sc_bus.devices_max = USS820_MAX_DEVICES; 138 139 /* get all DMA memory */ | 3 4/*- 5 * Copyright (c) 2008 Hans Petter Selasky <hselasky@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 121 unchanged lines hidden (view full) --- 132 int rid; 133 134 /* initialise some bus fields */ 135 sc->sc_bus.parent = dev; 136 sc->sc_bus.devices = sc->sc_devices; 137 sc->sc_bus.devices_max = USS820_MAX_DEVICES; 138 139 /* get all DMA memory */ |
140 if (usb2_bus_mem_alloc_all(&sc->sc_bus, | 140 if (usb_bus_mem_alloc_all(&sc->sc_bus, |
141 USB_GET_DMA_TAG(dev), NULL)) { 142 return (ENOMEM); 143 } 144 rid = 0; 145 sc->sc_io_res = 146 bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); 147 148 if (!sc->sc_io_res) { --- 73 unchanged lines hidden (view full) --- 222 sc->sc_irq_res); 223 sc->sc_irq_res = NULL; 224 } 225 if (sc->sc_io_res) { 226 bus_release_resource(dev, SYS_RES_IOPORT, 0, 227 sc->sc_io_res); 228 sc->sc_io_res = NULL; 229 } | 141 USB_GET_DMA_TAG(dev), NULL)) { 142 return (ENOMEM); 143 } 144 rid = 0; 145 sc->sc_io_res = 146 bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); 147 148 if (!sc->sc_io_res) { --- 73 unchanged lines hidden (view full) --- 222 sc->sc_irq_res); 223 sc->sc_irq_res = NULL; 224 } 225 if (sc->sc_io_res) { 226 bus_release_resource(dev, SYS_RES_IOPORT, 0, 227 sc->sc_io_res); 228 sc->sc_io_res = NULL; 229 } |
230 usb2_bus_mem_free_all(&sc->sc_bus, NULL); | 230 usb_bus_mem_free_all(&sc->sc_bus, NULL); |
231 232 return (0); 233} | 231 232 return (0); 233} |