svn commit: r196236 - in projects/mips/sys/mips: malta octeon1 sentry5

Warner Losh imp at FreeBSD.org
Sat Aug 15 01:03:14 UTC 2009


Author: imp
Date: Sat Aug 15 01:03:13 2009
New Revision: 196236
URL: http://svn.freebsd.org/changeset/base/196236

Log:
  Fix style error replicated multiple times.  Move to
  mips_bus_space_generic for octeon obio impl.

Modified:
  projects/mips/sys/mips/malta/obio.c
  projects/mips/sys/mips/octeon1/obio.c
  projects/mips/sys/mips/sentry5/obio.c

Modified: projects/mips/sys/mips/malta/obio.c
==============================================================================
--- projects/mips/sys/mips/malta/obio.c	Sat Aug 15 00:04:12 2009	(r196235)
+++ projects/mips/sys/mips/malta/obio.c	Sat Aug 15 01:03:13 2009	(r196236)
@@ -63,20 +63,18 @@ int	obio_attach(device_t);
  * A bit tricky and hackish. Since we need OBIO to rely
  * on PCI we make it pseudo-pci device. But there should 
  * be only one such device, so we use this static flag 
- * to prevent false positives on every realPCI device probe. 
+ * to prevent false positives on every real PCI device probe.
  */
 static int have_one = 0;
 
 int
 obio_probe(device_t dev)
 {
-	if(!have_one)
-	{
+	if (!have_one) {
 		have_one = 1;
 		return 0;
 	}
-	else
-		return (ENXIO);
+	return (ENXIO);
 }
 
 int

Modified: projects/mips/sys/mips/octeon1/obio.c
==============================================================================
--- projects/mips/sys/mips/octeon1/obio.c	Sat Aug 15 00:04:12 2009	(r196235)
+++ projects/mips/sys/mips/octeon1/obio.c	Sat Aug 15 01:03:13 2009	(r196236)
@@ -60,22 +60,19 @@ int	obio_probe(device_t);
 int	obio_attach(device_t);
 
 /*
- * We need only one obio.
- * Any other device hanging off of it, shouldn't cause multiple of
- * these to be found.
+ * We need only one obio.  Any other device hanging off of it,
+ * shouldn't cause multiple of these to be found.
  */
 static int have_one = 0;
 
 int
 obio_probe(device_t dev)
 {
-	if(!have_one)
-	{
+	if (!have_one) {
 		have_one = 1;
 		return 0;
 	}
-	else
-		return (ENXIO);
+	return (ENXIO);
 }
 
 int
@@ -83,7 +80,7 @@ obio_attach(device_t dev)
 {
 	struct obio_softc *sc = device_get_softc(dev);
 
-	sc->oba_st = MIPS_BUS_SPACE_IO;
+	sc->oba_st = mips_bus_space_generic;
 	sc->oba_addr = OCTEON_UART0ADR;
 	sc->oba_size = 0x10000;
 	sc->oba_rman.rm_type = RMAN_ARRAY;

Modified: projects/mips/sys/mips/sentry5/obio.c
==============================================================================
--- projects/mips/sys/mips/sentry5/obio.c	Sat Aug 15 00:04:12 2009	(r196235)
+++ projects/mips/sys/mips/sentry5/obio.c	Sat Aug 15 01:03:13 2009	(r196236)
@@ -72,13 +72,11 @@ static int have_one = 0;
 int
 obio_probe(device_t dev)
 {
-	if(!have_one)
-	{
+	if (!have_one) {
 		have_one = 1;
 		return 0;
 	}
-	else
-		return (ENXIO);
+	return (ENXIO);
 }
 
 int


More information about the svn-src-projects mailing list