Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2008 22:14:19 GMT
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 151633 for review
Message-ID:  <200810202214.m9KMEJHH074098@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151633

Change 151633 by nwhitehorn@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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810202214.m9KMEJHH074098>