PERFORCE change 151633 for review
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Mon Oct 20 22:14:20 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=151633
Change 151633 by nwhitehorn at nwhitehorn_trantor on 2008/10/20 22:13:30
Fix messed up indentation.
Affected files ...
.. //depot/projects/ppc-g5/sys/powerpc/aim/nexus.c#4 edit
Differences ...
==== //depot/projects/ppc-g5/sys/powerpc/aim/nexus.c#4 (text+ko) ====
@@ -438,7 +438,7 @@
static int
nexus_activate_resource(device_t bus, device_t child, int type, int rid,
-struct resource *res)
+ struct resource *res)
{
if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) {
vm_offset_t start;
@@ -459,47 +459,45 @@
static int
nexus_deactivate_resource(device_t bus, device_t child, int type, int rid,
-struct resource *res)
+ struct resource *res)
{
-
-/* Not much to be done yet... */
-return (rman_deactivate_resource(res));
+ /* Not much to be done yet... */
+ return (rman_deactivate_resource(res));
}
static int
nexus_release_resource(device_t bus, device_t child, int type, int rid,
-struct resource *res)
+ struct resource *res)
{
+ if (type != SYS_RES_IRQ) {
+ device_printf(bus, "unknown resource request from %s\n",
+ device_get_nameunit(child));
+ return (EINVAL);
+ }
-if (type != SYS_RES_IRQ) {
- device_printf(bus, "unknown resource request from %s\n",
- device_get_nameunit(child));
- return (EINVAL);
+ return (rman_release_resource(res));
}
-return (rman_release_resource(res));
-}
-
static device_t
nexus_device_from_node(device_t parent, phandle_t node)
{
-device_t cdev;
-struct nexus_devinfo *dinfo;
-char *name, *type, *compatible;
+ device_t cdev;
+ struct nexus_devinfo *dinfo;
+ char *name, *type, *compatible;
-OF_getprop_alloc(node, "name", 1, (void **)&name);
-OF_getprop_alloc(node, "device_type", 1, (void **)&type);
-OF_getprop_alloc(node, "compatible", 1, (void **)&compatible);
-cdev = device_add_child(parent, NULL, -1);
-if (cdev != NULL) {
- dinfo = malloc(sizeof(*dinfo), M_NEXUS, M_WAITOK);
- dinfo->ndi_node = node;
- dinfo->ndi_name = name;
- dinfo->ndi_device_type = type;
- dinfo->ndi_compatible = compatible;
- device_set_ivars(cdev, dinfo);
-} else
- free(name, M_OFWPROP);
+ OF_getprop_alloc(node, "name", 1, (void **)&name);
+ OF_getprop_alloc(node, "device_type", 1, (void **)&type);
+ OF_getprop_alloc(node, "compatible", 1, (void **)&compatible);
+ cdev = device_add_child(parent, NULL, -1);
+ if (cdev != NULL) {
+ dinfo = malloc(sizeof(*dinfo), M_NEXUS, M_WAITOK);
+ dinfo->ndi_node = node;
+ dinfo->ndi_name = name;
+ dinfo->ndi_device_type = type;
+ dinfo->ndi_compatible = compatible;
+ device_set_ivars(cdev, dinfo);
+ } else
+ free(name, M_OFWPROP);
return (cdev);
}
More information about the p4-projects
mailing list