PERFORCE change 98308 for review

Warner Losh imp at FreeBSD.org
Fri Jun 2 06:20:05 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=98308

Change 98308 by imp at imp_lighthouse on 2006/06/02 06:18:16

	pci attachment now links.
	malloc the ivars, rather than get them to avoid a core dump

Affected files ...

.. //depot/projects/arm/src/sys/dev/sdhc/sdhc.c#1 add
.. //depot/projects/arm/src/sys/dev/sdhc/sdhc_pci.c#2 edit
.. //depot/projects/arm/src/sys/modules/sdhc/Makefile#2 edit

Differences ...

==== //depot/projects/arm/src/sys/dev/sdhc/sdhc_pci.c#2 (text+ko) ====

@@ -35,6 +35,7 @@
 #include <sys/param.h>
 #include <sys/bus.h>
 #include <sys/kernel.h>
+#include <sys/malloc.h>
 #include <sys/module.h>
 #include <sys/systm.h>
 
@@ -80,7 +81,8 @@
 			bus_release_resource(dev, SYS_RES_MEMORY, i, res);
 			continue;
 		}
-		ivars = (struct sdhc_ivars *) device_get_ivars(child);
+		ivars = (struct sdhc_ivars *) malloc(sizeof *ivars, M_DEVBUF,
+		    M_WAITOK);
 		ivars->res = res;
 		device_set_ivars(child, ivars);
 	}

==== //depot/projects/arm/src/sys/modules/sdhc/Makefile#2 (text+ko) ====

@@ -3,7 +3,7 @@
 .PATH: ${.CURDIR}/../../dev/sdhc
 
 KMOD=	sdhc
-SRCS=	sdhc_pci.c \
+SRCS=	sdhc_pci.c sdhc.c \
 	device_if.h bus_if.h pci_if.h
 
 .include <bsd.kmod.mk>


More information about the p4-projects mailing list