PERFORCE change 96291 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri Apr 28 06:36:30 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96291
Change 96291 by marcel at marcel_nfs on 2006/04/28 06:35:41
Use NULL as the device for unassigned resources.
Affected files ...
.. //depot/projects/uart/dev/puc/puc.c#41 edit
Differences ...
==== //depot/projects/uart/dev/puc/puc.c#41 (text+ko) ====
@@ -276,7 +276,7 @@
rm = (bar->b_type == SYS_RES_IOPORT)
? &sc->sc_ioport: &sc->sc_iomem;
port->p_rres = rman_reserve_resource(rm, start + ofs,
- start + ofs + size - 1, size, 0, sc->sc_dev);
+ start + ofs + size - 1, size, 0, NULL);
if (port->p_rres != NULL) {
bsh = rman_get_bushandle(bar->b_res);
bst = rman_get_bustag(bar->b_res);
@@ -285,7 +285,7 @@
rman_set_bustag(port->p_rres, bst);
}
port->p_ires = rman_reserve_resource(&sc->sc_irq, port->p_nr,
- port->p_nr, 1, 0, sc->sc_dev);
+ port->p_nr, 1, 0, NULL);
if (port->p_ires == NULL) {
error = ENXIO;
goto fail;
@@ -490,7 +490,7 @@
return (NULL);
assigned = rman_get_device(res);
- if (assigned == dev) /* Not allocated */
+ if (assigned == NULL) /* Not allocated */
rman_set_device(res, originator);
else if (assigned != originator)
return (NULL);
@@ -498,8 +498,8 @@
if (flags & RF_ACTIVE) {
error = rman_activate_resource(res);
if (error) {
- if (assigned == dev)
- rman_set_device(res, dev);
+ if (assigned == NULL)
+ rman_set_device(res, NULL);
return (NULL);
}
}
@@ -542,7 +542,7 @@
return (ENXIO);
if (rman_get_flags(res) & RF_ACTIVE)
rman_deactivate_resource(res);
- rman_set_device(res, dev);
+ rman_set_device(res, NULL);
return (0);
}
More information about the p4-projects
mailing list